소스 검색

badge count sentry error

Viktoriia 12 시간 전
부모
커밋
db400a2c8f
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/contexts/PushNotificationContext.tsx

+ 2 - 2
src/contexts/PushNotificationContext.tsx

@@ -45,7 +45,7 @@ export const PushNotificationProvider = ({ children }: { children: React.ReactNo
       if (appState.match(/inactive|background/) && nextAppState === 'active' && isSubscribed) {
         Notifications.getBadgeCountAsync().then((badgeCount) => {
           if (badgeCount > 0) {
-            Notifications.setBadgeCountAsync(-1);
+            Notifications.setBadgeCountAsync(0);
           }
         });
         Notifications.getPresentedNotificationsAsync().then((notifications) => {
@@ -284,7 +284,7 @@ export const PushNotificationProvider = ({ children }: { children: React.ReactNo
 
       Notifications.getBadgeCountAsync().then((badgeCount) => {
         if (badgeCount > 0) {
-          Notifications.setBadgeCountAsync(-1);
+          Notifications.setBadgeCountAsync(0);
         }
       });