From dc5c3070b3b69f3c0eaba83ead5eaeb6e3b4e311 Mon Sep 17 00:00:00 2001 From: Hailey Date: Thu, 16 May 2024 12:10:53 -0700 Subject: [PATCH] nit --- src/state/queries/notifications/unread.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/state/queries/notifications/unread.tsx b/src/state/queries/notifications/unread.tsx index dd7895282c..9d35ee19fb 100644 --- a/src/state/queries/notifications/unread.tsx +++ b/src/state/queries/notifications/unread.tsx @@ -119,12 +119,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) { // update & broadcast setNumUnread('') broadcast.postMessage({event: ''}) - - if (cacheRef.current.unreadCount >= 30) { - decrementBadgeCount(30) - } else { - decrementBadgeCount(cacheRef.current.unreadCount) - } + decrementBadgeCount(Math.min(cacheRef.current.unreadCount, 30)) }, async checkUnread({