Bladeren bron

badge count sentry error

Viktoriia 10 uur geleden
bovenliggende
commit
db400a2c8f
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  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);
         }
       });