change block footer for groups
This commit is contained in:
@@ -22,10 +22,12 @@ export function MessagesListBlockedFooter({
|
|||||||
recipient: initialRecipient,
|
recipient: initialRecipient,
|
||||||
convoId,
|
convoId,
|
||||||
moderation,
|
moderation,
|
||||||
|
isGroup,
|
||||||
}: {
|
}: {
|
||||||
recipient: bsky.profile.AnyProfileView
|
recipient: bsky.profile.AnyProfileView
|
||||||
convoId: string
|
convoId: string
|
||||||
moderation: ModerationDecision
|
moderation: ModerationDecision
|
||||||
|
isGroup: boolean
|
||||||
}) {
|
}) {
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
const {t: l} = useLingui()
|
const {t: l} = useLingui()
|
||||||
@@ -64,9 +66,7 @@ export function MessagesListBlockedFooter({
|
|||||||
a.justify_center,
|
a.justify_center,
|
||||||
a.p_lg,
|
a.p_lg,
|
||||||
t.atoms.bg_contrast_50,
|
t.atoms.bg_contrast_50,
|
||||||
{
|
{borderRadius: 40},
|
||||||
borderRadius: 40,
|
|
||||||
},
|
|
||||||
]}>
|
]}>
|
||||||
<PersonXIcon fill={t.atoms.text.color} size="lg" style={[a.mb_xs]} />
|
<PersonXIcon fill={t.atoms.text.color} size="lg" style={[a.mb_xs]} />
|
||||||
<Text
|
<Text
|
||||||
@@ -77,9 +77,11 @@ export function MessagesListBlockedFooter({
|
|||||||
a.font_semi_bold,
|
a.font_semi_bold,
|
||||||
t.atoms.text,
|
t.atoms.text,
|
||||||
]}>
|
]}>
|
||||||
{isBlocking
|
{isGroup
|
||||||
? l`You are blocking this person`
|
? l`You are blocking the chat owner`
|
||||||
: l`This person is blocking you`}
|
: isBlocking
|
||||||
|
? l`You are blocking this person`
|
||||||
|
: l`This person is blocking you`}
|
||||||
</Text>
|
</Text>
|
||||||
<Text
|
<Text
|
||||||
style={[
|
style={[
|
||||||
|
|||||||
@@ -230,11 +230,19 @@ function InnerReady({
|
|||||||
let footer: React.ReactNode = null
|
let footer: React.ReactNode = null
|
||||||
if (isDisabled) {
|
if (isDisabled) {
|
||||||
footer = <ChatDisabled />
|
footer = <ChatDisabled />
|
||||||
} else if (convo && primaryMember && primaryMemberModeration?.blocked) {
|
} else if (
|
||||||
|
convo &&
|
||||||
|
primaryMember &&
|
||||||
|
primaryMemberModeration &&
|
||||||
|
(convo.kind === 'group'
|
||||||
|
? primaryMemberModeration?.blockCause?.type === 'blocking'
|
||||||
|
: primaryMemberModeration?.blocked)
|
||||||
|
) {
|
||||||
footer = (
|
footer = (
|
||||||
<MessagesListBlockedFooter
|
<MessagesListBlockedFooter
|
||||||
recipient={primaryMember}
|
recipient={primaryMember}
|
||||||
convoId={convo.view.id}
|
convoId={convo.view.id}
|
||||||
|
isGroup={convo.kind === 'group'}
|
||||||
moderation={primaryMemberModeration}
|
moderation={primaryMemberModeration}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user