diff options
author | Eric Bailey <git@esb.lol> | 2024-06-10 20:36:42 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-11 03:36:42 +0200 |
commit | 212f5750e3f45b6b6f042058c1819ecd92346baa (patch) | |
tree | 367c789c0c93723d8af11b41be954f4e15a2323d /src | |
parent | c73ad43a8005a90f8fe3152142cbed28c297ee6c (diff) | |
download | voidsky-212f5750e3f45b6b6f042058c1819ecd92346baa.tar.zst |
Open convo menu when tapping on chat with deleted account (#4470)
* Open menu on click * Remove useless util * Improve label * s/press/click * Tweak message --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/screens/Messages/List/ChatListItem.tsx | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/screens/Messages/List/ChatListItem.tsx b/src/screens/Messages/List/ChatListItem.tsx index 9f8808366..7c6117082 100644 --- a/src/screens/Messages/List/ChatListItem.tsx +++ b/src/screens/Messages/List/ChatListItem.tsx @@ -179,12 +179,13 @@ function ChatListItemReady({ (e: GestureResponderEvent) => { if (isDeletedAccount) { e.preventDefault() + menuControl.open() return false } else { logEvent('chat:open', {logContext: 'ChatsList'}) } }, - [isDeletedAccount], + [isDeletedAccount, menuControl], ) const onLongPress = useCallback(() => { @@ -206,7 +207,9 @@ function ChatListItemReady({ accessibilityHint={ !isDeletedAccount ? _(msg`Go to conversation with ${profile.handle}`) - : undefined + : _( + msg`This conversation is with a deleted or a deactivated account. Press for options.`, + ) } accessibilityActions={ isNative @@ -218,12 +221,7 @@ function ChatListItemReady({ } onPress={onPress} onLongPress={isNative ? onLongPress : undefined} - onAccessibilityAction={onLongPress} - style={[ - web({ - cursor: isDeletedAccount ? 'default' : 'pointer', - }), - ]}> + onAccessibilityAction={onLongPress}> {({hovered, pressed, focused}) => ( <View style={[ @@ -233,9 +231,7 @@ function ChatListItemReady({ a.px_lg, a.py_md, a.gap_md, - (hovered || pressed || focused) && - !isDeletedAccount && - t.atoms.bg_contrast_25, + (hovered || pressed || focused) && t.atoms.bg_contrast_25, t.atoms.border_contrast_low, ]}> <UserAvatar |