diff options
author | Eric Bailey <git@esb.lol> | 2024-05-20 18:56:44 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-20 16:56:44 -0700 |
commit | a7b0242cc8aaf09273abe20903e88e59a4acd1a7 (patch) | |
tree | 9e3f21bcf0def435877e2a1a9c5fc8eedc6c7950 /src/screens/Messages/List/ChatListItem.tsx | |
parent | 6dde48756366008a897bfffdcec6c1756df59ef4 (diff) | |
download | voidsky-a7b0242cc8aaf09273abe20903e88e59a4acd1a7.tar.zst |
[🐴] Empty chat prompt (#4132)
* Add empty chat pill * Tweak padding * move to `components`, place inside `KeyboardStickyView` * cleanup unused vars * add a new animation type * (unrelated) add haptic to long press * adjust shrink and pop --------- Co-authored-by: Hailey <me@haileyok.com>
Diffstat (limited to 'src/screens/Messages/List/ChatListItem.tsx')
-rw-r--r-- | src/screens/Messages/List/ChatListItem.tsx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/screens/Messages/List/ChatListItem.tsx b/src/screens/Messages/List/ChatListItem.tsx index 682a2197e..ce0c7eee8 100644 --- a/src/screens/Messages/List/ChatListItem.tsx +++ b/src/screens/Messages/List/ChatListItem.tsx @@ -13,6 +13,7 @@ import {isNative} from '#/platform/detection' import {useProfileShadow} from '#/state/cache/profile-shadow' import {useModerationOpts} from '#/state/preferences/moderation-opts' import {useSession} from '#/state/session' +import {useHaptics} from 'lib/haptics' import {logEvent} from 'lib/statsig/statsig' import {sanitizeDisplayName} from 'lib/strings/display-names' import {TimeElapsed} from '#/view/com/util/TimeElapsed' @@ -70,6 +71,7 @@ function ChatListItemReady({ () => moderateProfile(profile, moderationOpts), [profile, moderationOpts], ) + const playHaptic = useHaptics() const blockInfo = React.useMemo(() => { const modui = moderation.ui('profileView') @@ -134,8 +136,9 @@ function ChatListItemReady({ ) const onLongPress = useCallback(() => { + playHaptic() menuControl.open() - }, [menuControl]) + }, [playHaptic, menuControl]) return ( <View @@ -162,7 +165,7 @@ function ChatListItemReady({ : undefined } onPress={onPress} - onLongPress={isNative ? menuControl.open : undefined} + onLongPress={isNative ? onLongPress : undefined} onAccessibilityAction={onLongPress} style={[ web({ |