diff options
author | Ivan Chen <ivan@tagg.id> | 2021-04-23 19:27:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-23 19:27:40 -0400 |
commit | ec04de92a8ab2e0b1c62c29dc8ab27acff18c1a3 (patch) | |
tree | ce38137b01e038f48f5c06d9c29fa020996166d0 | |
parent | 26fe5a1b13e897d97ad470224d22526dcde86832 (diff) | |
parent | 4ce89289547bea0914a98b8307f4539464281f96 (diff) |
Merge pull request #386 from IvanIFChen/hotfix-navigation-after-chat-notification
[HOTFIX] Added logic to navigate on notification opened
-rw-r--r-- | src/services/FCMService.ts | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/services/FCMService.ts b/src/services/FCMService.ts index 711483ec..f76e94b6 100644 --- a/src/services/FCMService.ts +++ b/src/services/FCMService.ts @@ -135,12 +135,11 @@ class FCMService { // Called when app is opened from backrground state messaging().onNotificationOpenedApp((remoteMessage) => { if (remoteMessage) { - // TODO: Get {name, params} of screen when user must be redirected to - // Redirected to Notification Screen for now - const redirectTo = 'Notifications'; - /* TODO: Check login status and redirect user/store screen to async as - initialRoute for NavigationBar Stack */ - RootNavigation.navigate(redirectTo); + if (remoteMessage.category === 'CHAT') { + RootNavigation.navigate('ChatList'); + } else { + RootNavigation.navigate('Notifications'); + } } }); |