about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSamuel Newman <mozzius@protonmail.com>2025-07-15 15:53:52 +0300
committerGitHub <noreply@github.com>2025-07-15 15:53:52 +0300
commit60c0689236cf40ea0411185aec16f916ebf40085 (patch)
tree3c3e8862845401c6e0de2a0bddb428eba0614c35
parent4ccbae7c30307bd19a9bd4afa9f2039aed9da94c (diff)
downloadvoidsky-60c0689236cf40ea0411185aec16f916ebf40085.tar.zst
Fix navigation (#8648)
-rw-r--r--src/view/com/util/Link.tsx1
-rw-r--r--src/view/shell/desktop/LeftNav.tsx2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/view/com/util/Link.tsx b/src/view/com/util/Link.tsx
index 4008a6fc3..6a931d9a4 100644
--- a/src/view/com/util/Link.tsx
+++ b/src/view/com/util/Link.tsx
@@ -11,6 +11,7 @@ import {
   type ViewStyle,
 } from 'react-native'
 import {sanitizeUrl} from '@braintree/sanitize-url'
+import {StackActions} from '@react-navigation/native'
 
 import {
   type DebouncedNavigationProp,
diff --git a/src/view/shell/desktop/LeftNav.tsx b/src/view/shell/desktop/LeftNav.tsx
index ee2b1778b..aa18f9b70 100644
--- a/src/view/shell/desktop/LeftNav.tsx
+++ b/src/view/shell/desktop/LeftNav.tsx
@@ -350,7 +350,7 @@ function NavItem({count, hasNew, href, icon, iconFilled, label}: NavItemProps) {
       } else {
         const [screen, params] = router.matchPath(href)
         // @ts-expect-error TODO: type matchPath well enough that it can be plugged into navigation.navigate directly
-        navigation.popTo(screen, params)
+        navigation.navigate(screen, params, {pop: true})
       }
     },
     [navigation, href, isCurrent],