Fix back swipe opening the drawer after a cold-start deep link (#11065)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Samuel Newman
2026-07-07 16:51:06 +03:00
committed by GitHub
parent 5e24a0b48c
commit 102905b962
3 changed files with 130 additions and 9 deletions
+2 -5
View File
@@ -30,7 +30,7 @@ import {
} from '#/lib/hooks/useNotificationHandler'
import {useWebScrollRestoration} from '#/lib/hooks/useWebScrollRestoration'
import {useCallOnce} from '#/lib/once'
import {buildStateObject} from '#/lib/routes/helpers'
import {buildStateObject, getCurrentRoute} from '#/lib/routes/helpers'
import {
type AllNavigatorParams,
type BottomTabNavigatorParams,
@@ -783,10 +783,7 @@ const LINKING = {
getPathFromState(state: State) {
// find the current node in the navigation tree
let node = state.routes[state.index || 0]
while (node.state?.routes && typeof node.state?.index === 'number') {
node = node.state?.routes[node.state?.index]
}
const node = getCurrentRoute(state)
// build the path
const route = router.matchName(node.name)