2 Commitit d06665e17e ... f41a5fa99d

Tekijä SHA1 Viesti Päivämäärä
  Viktoriia f41a5fa99d Merge branch 'dev' of https://git.nomadmania.travel/Viktoriia/nomadmania-app into dev 23 tuntia sitten
  Viktoriia 069ffae696 deep links for messages 23 tuntia sitten
3 muutettua tiedostoa jossa 30 lisäystä ja 1 poistoa
  1. 2 1
      App.tsx
  2. 5 0
      app.config.ts
  3. 23 0
      src/contexts/NavigationContext.tsx

+ 2 - 1
App.tsx

@@ -79,7 +79,8 @@ const linking = {
     screens: {
       publicProfileView: '/profile/:userId',
       inAppEvent: '/event/:url',
-      inAppMapTab: '/map/:lon/:lat'
+      inAppMapTab: '/map/:lon/:lat',
+      inAppMessagesTab: '/messages'
     }
   }
 };

+ 5 - 0
app.config.ts

@@ -124,6 +124,11 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
             scheme: 'https',
             host: 'nomadmania.com',
             pathPrefix: '/map/'
+          },
+          {
+            scheme: 'https',
+            host: 'nomadmania.com',
+            pathPrefix: '/messages/'
           }
         ],
         category: ['BROWSABLE', 'DEFAULT']

+ 23 - 0
src/contexts/NavigationContext.tsx

@@ -103,6 +103,29 @@ export const NavigationProvider = ({ children }: { children: React.ReactNode })
             })
           );
         }
+      } else if (path.startsWith('/messages')) {
+        navigation.dispatch(
+          CommonActions.reset({
+            index: 1,
+            routes: [
+              {
+                name: 'DrawerApp',
+                state: {
+                  routes: [
+                    {
+                      name: NAVIGATION_PAGES.IN_APP_MESSAGES_TAB,
+                      state: {
+                        routes: [
+                          { name: NAVIGATION_PAGES.CHATS_LIST },
+                        ]
+                      }
+                    }
+                  ]
+                }
+              }
+            ]
+          })
+        );
       }
     }
     if (!initialUrlProcessed) {