diff options
author | Hailey <me@haileyok.com> | 2024-06-11 10:28:48 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-11 10:28:48 -0700 |
commit | fac5f6cdacadf552e51743b145a5d4de40eb15be (patch) | |
tree | d6975abe68c8b1ee7d8a01102af3984164e7ff19 /src/screens/Messages/List/ChatListItem.tsx | |
parent | 808dd3569d1f004903d2bf54f29de2db74bbefd1 (diff) | |
download | voidsky-fac5f6cdacadf552e51743b145a5d4de40eb15be.tar.zst |
register the push token after request has been approved on android (#4481)
* register the push token after request has been approved on android * use a `0` string for badge count * Revert "use a `0` string for badge count" This reverts commit efac39861817f4237c58211f68ef266d919b4d40. * temporary fix
Diffstat (limited to 'src/screens/Messages/List/ChatListItem.tsx')
-rw-r--r-- | src/screens/Messages/List/ChatListItem.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/screens/Messages/List/ChatListItem.tsx b/src/screens/Messages/List/ChatListItem.tsx index 7c6117082..8ebf8b00b 100644 --- a/src/screens/Messages/List/ChatListItem.tsx +++ b/src/screens/Messages/List/ChatListItem.tsx @@ -20,6 +20,7 @@ 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 {decrementBadgeCount} from 'lib/notifications/notifications' import {logEvent} from 'lib/statsig/statsig' import {sanitizeDisplayName} from 'lib/strings/display-names' import {TimeElapsed} from '#/view/com/util/TimeElapsed' @@ -177,6 +178,7 @@ function ChatListItemReady({ const onPress = useCallback( (e: GestureResponderEvent) => { + decrementBadgeCount(convo.unreadCount) if (isDeletedAccount) { e.preventDefault() menuControl.open() @@ -185,7 +187,7 @@ function ChatListItemReady({ logEvent('chat:open', {logContext: 'ChatsList'}) } }, - [isDeletedAccount, menuControl], + [convo.unreadCount, isDeletedAccount, menuControl], ) const onLongPress = useCallback(() => { |