Bläddra i källkod

badge count sentry error

Viktoriia 12 timmar sedan
förälder
incheckning
db400a2c8f
1 ändrade filer med 2 tillägg och 2 borttagningar
  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);
         }
       });