Skip to content

Commit

Permalink
comment out notification recieved listener
Browse files Browse the repository at this point in the history
  • Loading branch information
stephaniewong2 committed Apr 26, 2024
1 parent bdd0948 commit 12cbfc9
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions src/app/(BottomTabNavigation)/AllCases/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,22 +84,22 @@ function CasesScreen() {
});
}

notificationListener.current =
Notifications.addNotificationReceivedListener(notification => {
const updateId = notification.request.content.data.updateId;
const debugString =
'NotificationRecieved: ' +
notification +
', ' +
notification.request +
', ' +
notification.request.content +
', ' +
notification.request.content.data;
console.log(debugString);
setNotificationResponse(debugString);
router.push(`/AllCases/Updates/UpdateView/${updateId}`);
});
// notificationListener.current =
// Notifications.addNotificationReceivedListener(notification => {
// const updateId = notification.request.content.data.updateId;
// const debugString =
// 'NotificationRecieved: ' +
// notification +
// ', ' +
// notification.request +
// ', ' +
// notification.request.content +
// ', ' +
// notification.request.content.data;
// console.log(debugString);
// setNotificationResponse(debugString);
// router.push(`/AllCases/Updates/UpdateView/${updateId}`);
// });

responseListener.current =
Notifications.addNotificationResponseReceivedListener(response => {
Expand All @@ -121,9 +121,9 @@ function CasesScreen() {
});

return () => {
Notifications.removeNotificationSubscription(
notificationListener.current!,
);
// Notifications.removeNotificationSubscription(
// notificationListener.current!,
// );

Notifications.removeNotificationSubscription(responseListener.current!);
};
Expand Down

0 comments on commit 12cbfc9

Please sign in to comment.