From f2e7028709504a04a584107a52749b1ad192b965 Mon Sep 17 00:00:00 2001 From: DS Boyce <260543580+ds-boyce@users.noreply.github.com> Date: Fri, 22 May 2026 09:46:57 -0700 Subject: [PATCH] Update appearance of chat when blocked (#10582) --- .../dms/MessagesListBlockedFooter.tsx | 103 +++++++++--------- src/screens/Messages/Conversation.tsx | 4 - 2 files changed, 49 insertions(+), 58 deletions(-) diff --git a/src/components/dms/MessagesListBlockedFooter.tsx b/src/components/dms/MessagesListBlockedFooter.tsx index 48886090ac..cfdaa3bc68 100644 --- a/src/components/dms/MessagesListBlockedFooter.tsx +++ b/src/components/dms/MessagesListBlockedFooter.tsx @@ -1,38 +1,37 @@ import {useCallback, useMemo} from 'react' import {View} from 'react-native' +import {LinearGradient} from 'expo-linear-gradient' import {type ModerationDecision} from '@atproto/api' -import {msg} from '@lingui/core/macro' -import {useLingui} from '@lingui/react' -import {Trans} from '@lingui/react/macro' +import {Trans, useLingui} from '@lingui/react/macro' import {useProfileShadow} from '#/state/cache/profile-shadow' import {useProfileBlockMutationQueue} from '#/state/queries/profile' import {atoms as a, useBreakpoints, useTheme} from '#/alf' -import {Button, ButtonText} from '#/components/Button' +import {Button, ButtonIcon, ButtonText} from '#/components/Button' import {useDialogControl} from '#/components/Dialog' -import {Divider} from '#/components/Divider' import {BlockedByListDialog} from '#/components/dms/BlockedByListDialog' import {LeaveConvoPrompt} from '#/components/dms/LeaveConvoPrompt' import {ReportConversationPrompt} from '#/components/dms/ReportConversationPrompt' +import {ArrowBoxLeft_Stroke2_Corner0_Rounded as LeaveIcon} from '#/components/icons/ArrowBoxLeft' +import {Flag_Stroke2_Corner0_Rounded as FlagIcon} from '#/components/icons/Flag' +import {PersonCheck_Stroke2_Corner0_Rounded as PersonCheckIcon} from '#/components/icons/Person' import {Text} from '#/components/Typography' import type * as bsky from '#/types/bsky' export function MessagesListBlockedFooter({ recipient: initialRecipient, convoId, - hasMessages, moderation, }: { recipient: bsky.profile.AnyProfileView convoId: string - hasMessages: boolean moderation: ModerationDecision }) { const t = useTheme() const {gtMobile} = useBreakpoints() - const {_} = useLingui() + const {t: l} = useLingui() const recipient = useProfileShadow(initialRecipient) - const [__, queueUnblock] = useProfileBlockMutationQueue(recipient) + const [_queueBlock, queueUnblock] = useProfileBlockMutationQueue(recipient) const leaveConvoControl = useDialogControl() const reportControl = useDialogControl() @@ -55,82 +54,78 @@ export function MessagesListBlockedFooter({ if (listBlocks.length) { blockedByListControl.open() } else { - queueUnblock() + void queueUnblock() } }, [blockedByListControl, listBlocks, queueUnblock]) return ( - - - - {isBlocking ? ( - You have blocked this user - ) : ( - This user has blocked you - )} + + + + {isBlocking + ? l`You are blocking this user` + : l`This user is blocking you`} - - + {isBlocking && gtMobile && ( )} {isBlocking && !gtMobile && ( - - - + )} - - - 0} /> {!readyToShow && ( > convo: ConvoWithDetails | null isActive: boolean isDisabled: boolean - hasMessages: boolean }) { const navigation = useNavigation() const {top: topInset} = useSafeAreaInsets() @@ -269,7 +266,6 @@ function InnerReady({ )