From d2c81c9d3d6aebae9c73a7567875e0165cfb1f08 Mon Sep 17 00:00:00 2001
From: Hailey <me@haileyok.com>
Date: Fri, 17 May 2024 16:05:32 -0700
Subject: Disable badge incrementing for DMs (#4088)

* disable badge increments for dms

* revert decrementing in js for dms

* reset badge on read notifications

* remove some other code

* prevent duplicate notification events
---
 src/state/queries/notifications/unread.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/state/queries/notifications/unread.tsx')

diff --git a/src/state/queries/notifications/unread.tsx b/src/state/queries/notifications/unread.tsx
index 9d35ee19f..acc68c360 100644
--- a/src/state/queries/notifications/unread.tsx
+++ b/src/state/queries/notifications/unread.tsx
@@ -119,7 +119,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
         // update & broadcast
         setNumUnread('')
         broadcast.postMessage({event: ''})
-        decrementBadgeCount(Math.min(cacheRef.current.unreadCount, 30))
+        decrementBadgeCount('reset')
       },
 
       async checkUnread({
-- 
cgit 1.4.1

