From c556c3271c9efdfd3864a3d8d049fe54ea98c09c Mon Sep 17 00:00:00 2001 From: Jungsub Ryoo Date: Tue, 22 Oct 2024 17:30:10 +0900 Subject: [PATCH] fix(client): better postive number for app badge (#30) --- src/main/front/src/hooks/useFeed.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/front/src/hooks/useFeed.js b/src/main/front/src/hooks/useFeed.js index 1f15a24..88cc72f 100644 --- a/src/main/front/src/hooks/useFeed.js +++ b/src/main/front/src/hooks/useFeed.js @@ -16,7 +16,7 @@ export const useFeedCount = () => { // Update badge as well if (navigator.setAppBadge) { // Display the number of unread messages. - navigator.setAppBadge(count > 0 ? count : 0); + navigator.setAppBadge(Math.max(count, 0)); } }, [count]);