[🐴] Decrement app badge when opening unread chat (#4040)
* decrement badge count for chats * handle decrement in `useMarkAsRead` * remove async * oops
This commit is contained in:
@@ -169,10 +169,11 @@ export function useNotificationsHandler() {
|
||||
payload.reason === 'chat-message' &&
|
||||
payload.recipientDid === currentAccount?.did
|
||||
) {
|
||||
const isCurrentConvo = payload.convoId === currentConvoId
|
||||
return {
|
||||
shouldShowAlert: payload.convoId !== currentConvoId,
|
||||
shouldShowAlert: !isCurrentConvo,
|
||||
shouldPlaySound: false,
|
||||
shouldSetBadge: false,
|
||||
shouldSetBadge: !isCurrentConvo,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user