diff options
author | Samuel Newman <mozzius@protonmail.com> | 2025-07-15 07:48:24 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-15 07:48:24 +0300 |
commit | 4ccbae7c30307bd19a9bd4afa9f2039aed9da94c (patch) | |
tree | d6fd20b75c8d41a222b0f513bb5c9fee49f1d6ca /src/view/com/util | |
parent | 1f82b1d5572c3944cf1f987e9090f8f626d67fcd (diff) | |
download | voidsky-4ccbae7c30307bd19a9bd4afa9f2039aed9da94c.tar.zst |
Fix perf issue on web - restore pop behaviour to tabs (#8620)
Diffstat (limited to 'src/view/com/util')
-rw-r--r-- | src/view/com/util/Link.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/view/com/util/Link.tsx b/src/view/com/util/Link.tsx index a9c12ba0e..4008a6fc3 100644 --- a/src/view/com/util/Link.tsx +++ b/src/view/com/util/Link.tsx @@ -11,7 +11,6 @@ import { type ViewStyle, } from 'react-native' import {sanitizeUrl} from '@braintree/sanitize-url' -import {StackActions} from '@react-navigation/native' import { type DebouncedNavigationProp, @@ -421,8 +420,10 @@ function onPressInner( if (tabState === TabState.InsideAtRoot) { emitSoftReset() } else { + // note: 'navigate' actually acts the same as 'push' nowadays + // therefore we need to add 'pop' -sfn // @ts-ignore we're not able to type check on this one -prf - navigation.navigate(routeName, params) + navigation.navigate(routeName, params, {pop: true}) } } else { throw Error('Unsupported navigator action.') |