aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-07-23 19:25:52 -0400
committerGitHub <noreply@github.com>2021-07-23 19:25:52 -0400
commit3ea48445e330b89ad0d78b3964e933a7d4d30395 (patch)
tree8bdc7e27f0b11ca7e1786604e01e0b07880a204f /src
parent2f64db843b80229d08f8f0ae7e1d80b24ac38c12 (diff)
parent7f408bd79187a5efd512f3d8dc203ebb15dde9f6 (diff)
Merge pull request #523 from shravyaramesh/tma920-badge-icon-reset
[TMA-920] Badge Reset on App Icon
Diffstat (limited to 'src')
-rw-r--r--src/screens/main/NotificationsScreen.tsx2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/screens/main/NotificationsScreen.tsx b/src/screens/main/NotificationsScreen.tsx
index 84c15f66..b19107a7 100644
--- a/src/screens/main/NotificationsScreen.tsx
+++ b/src/screens/main/NotificationsScreen.tsx
@@ -29,6 +29,7 @@ import {
import {RootState} from '../../store/rootReducer';
import {NotificationType, ScreenType} from '../../types';
import {getDateAge, normalize, SCREEN_HEIGHT, SCREEN_WIDTH} from '../../utils';
+import PushNotificationIOS from '@react-native-community/push-notification-ios';
const NotificationsScreen: React.FC = () => {
const {newNotificationReceived} = useSelector(
@@ -111,6 +112,7 @@ const NotificationsScreen: React.FC = () => {
: moment(previousLastViewed),
);
await AsyncStorage.setItem(key, moment().toString());
+ PushNotificationIOS.setApplicationIconBadgeNumber(0);
};
getAndUpdateLastViewed();
}, [notifications]);