about summary refs log tree commit diff
path: root/src/Navigation.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Navigation.tsx')
-rw-r--r--src/Navigation.tsx11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/Navigation.tsx b/src/Navigation.tsx
index 87330e3bf..77e7cfa0b 100644
--- a/src/Navigation.tsx
+++ b/src/Navigation.tsx
@@ -410,7 +410,16 @@ const LINKING = {
       if (name === 'Notifications') {
         return buildStateObject('NotificationsTab', 'Notifications', params)
       }
-      return buildStateObject('HomeTab', name, params)
+      if (name === 'Home') {
+        return buildStateObject('HomeTab', 'Home', params)
+      }
+      // if the path is something else, like a post, profile, or even settings, we need to initialize the home tab as pre-existing state otherwise the back button will not work
+      return buildStateObject('HomeTab', name, params, [
+        {
+          name: 'Home',
+          params: {},
+        },
+      ])
     } else {
       return buildStateObject('Flat', name, params)
     }