···11-diff --git a/node_modules/@react-navigation/native/lib/commonjs/useLinking.js b/node_modules/@react-navigation/native/lib/commonjs/useLinking.js
22-index ef4f368..2b0da35 100644
33---- a/node_modules/@react-navigation/native/lib/commonjs/useLinking.js
44-+++ b/node_modules/@react-navigation/native/lib/commonjs/useLinking.js
55-@@ -273,8 +273,12 @@ function useLinking(ref, _ref) {
66- });
77- const currentIndex = history.index;
88- try {
99-- if (nextIndex !== -1 && nextIndex < currentIndex) {
1010-- // An existing entry for this path exists and it's less than current index, go back to that
1111-+ if (
1212-+ nextIndex !== -1 &&
1313-+ nextIndex < currentIndex &&
1414-+ // We should only go back if the entry exists and it's less than current index
1515-+ history.get(nextIndex - currentIndex)
1616-+ ) { // An existing entry for this path exists and it's less than current index, go back to that
1717- await history.go(nextIndex - currentIndex);
1818- } else {
1919- // We couldn't find an existing entry to go back to, so we'll go back by the delta
2020-diff --git a/node_modules/@react-navigation/native/lib/module/useLinking.js b/node_modules/@react-navigation/native/lib/module/useLinking.js
2121-index 62a3b43..11a5a28 100644
2222---- a/node_modules/@react-navigation/native/lib/module/useLinking.js
2323-+++ b/node_modules/@react-navigation/native/lib/module/useLinking.js
2424-@@ -264,8 +264,12 @@ export default function useLinking(ref, _ref) {
2525- });
2626- const currentIndex = history.index;
2727- try {
2828-- if (nextIndex !== -1 && nextIndex < currentIndex) {
2929-- // An existing entry for this path exists and it's less than current index, go back to that
3030-+ if (
3131-+ nextIndex !== -1 &&
3232-+ nextIndex < currentIndex &&
3333-+ // We should only go back if the entry exists and it's less than current index
3434-+ history.get(nextIndex - currentIndex)
3535-+ ) { // An existing entry for this path exists and it's less than current index, go back to that
3636- await history.go(nextIndex - currentIndex);
3737- } else {
3838- // We couldn't find an existing entry to go back to, so we'll go back by the delta
3939-diff --git a/node_modules/@react-navigation/native/src/useLinking.tsx b/node_modules/@react-navigation/native/src/useLinking.tsx
4040-index 3db40b7..9ba4ecd 100644
4141---- a/node_modules/@react-navigation/native/src/useLinking.tsx
4242-+++ b/node_modules/@react-navigation/native/src/useLinking.tsx
4343-@@ -381,7 +381,12 @@ export default function useLinking(
4444- const currentIndex = history.index;
4545-4646- try {
4747-- if (nextIndex !== -1 && nextIndex < currentIndex) {
4848-+ if (
4949-+ nextIndex !== -1 &&
5050-+ nextIndex < currentIndex &&
5151-+ // We should only go back if the entry exists and it's less than current index
5252-+ history.get(nextIndex - currentIndex)
5353-+ ) {
5454- // An existing entry for this path exists and it's less than current index, go back to that
5555- await history.go(nextIndex - currentIndex);
5656- } else {
-5
patches/@react-navigation+native+6.1.7.patch.md
···11-# React Navigation history bug patch
22-33-This patches react-navigation to fix the issues in https://github.com/bluesky-social/social-app/issues/710.
44-55-This is based on the PR found at https://github.com/react-navigation/react-navigation/pull/11833
+7-2
src/lib/routes/helpers.ts
···11import {NavigationProp} from '@react-navigation/native'
22-import {State, RouteParams} from './types'
22+33+import {RouteParams, State} from './types'
3445export function getRootNavigation<T extends {}>(
56 nav: NavigationProp<T>,
···1011 return nav
1112}
12131313-export function getCurrentRoute(state: State) {
1414+export function getCurrentRoute(state?: State) {
1515+ if (!state) {
1616+ return {name: 'Home'}
1717+ }
1818+1419 let node = state.routes[state.index || 0]
1520 while (node.state?.routes && typeof node.state?.index === 'number') {
1621 node = node.state?.routes[node.state?.index]
+3-2
src/view/com/feeds/FeedPage.tsx
···33import {AppBskyActorDefs} from '@atproto/api'
44import {msg} from '@lingui/macro'
55import {useLingui} from '@lingui/react'
66-import {useNavigation} from '@react-navigation/native'
66+import {NavigationProp, useNavigation} from '@react-navigation/native'
77import {useQueryClient} from '@tanstack/react-query'
8899import {getRootNavigation, getTabState, TabState} from '#/lib/routes/helpers'
···1919import {useComposerControls} from '#/state/shell/composer'
2020import {useAnalytics} from 'lib/analytics/analytics'
2121import {ComposeIcon2} from 'lib/icons'
2222+import {AllNavigatorParams} from 'lib/routes/types'
2223import {s} from 'lib/styles'
2324import {useHeaderOffset} from '#/components/hooks/useHeaderOffset'
2425import {Feed} from '../posts/Feed'
···4849}) {
4950 const {hasSession} = useSession()
5051 const {_} = useLingui()
5151- const navigation = useNavigation()
5252+ const navigation = useNavigation<NavigationProp<AllNavigatorParams>>()
5253 const queryClient = useQueryClient()
5354 const {openComposer} = useComposerControls()
5455 const [isScrolledDown, setIsScrolledDown] = React.useState(false)