aboutsummaryrefslogtreecommitdiff
path: root/src/screens/main/NotificationsScreen.tsx
diff options
context:
space:
mode:
authorShravya Ramesh <shravs1208@gmail.com>2021-07-23 08:04:40 -0700
committerShravya Ramesh <shravs1208@gmail.com>2021-07-23 08:04:40 -0700
commit7f408bd79187a5efd512f3d8dc203ebb15dde9f6 (patch)
tree9fa13021c133600230aff6e6918468e3376d7650 /src/screens/main/NotificationsScreen.tsx
parentb06b93e77ca7ec1b1107c0a58dbc2dd370208ccf (diff)
Add package to set badge icon, Reset badge icon
Diffstat (limited to 'src/screens/main/NotificationsScreen.tsx')
-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]);