diff options
Diffstat (limited to 'src/view/screens/Search/Search.tsx')
-rw-r--r-- | src/view/screens/Search/Search.tsx | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/view/screens/Search/Search.tsx b/src/view/screens/Search/Search.tsx index 8fadfe864..54e042d04 100644 --- a/src/view/screens/Search/Search.tsx +++ b/src/view/screens/Search/Search.tsx @@ -42,8 +42,8 @@ import {MagnifyingGlassIcon} from '#/lib/icons' import {useModerationOpts} from '#/state/queries/preferences' import {SearchResultCard} from '#/view/shell/desktop/Search' import {useSetMinimalShellMode, useSetDrawerSwipeDisabled} from '#/state/shell' -import {useStores} from '#/state' import {isWeb} from '#/platform/detection' +import {listenSoftReset} from '#/state/events' function Loader() { const pal = usePalette('default') @@ -421,7 +421,6 @@ export function SearchScreenMobile( const moderationOpts = useModerationOpts() const search = useActorAutocompleteFn() const setMinimalShellMode = useSetMinimalShellMode() - const store = useStores() const {isTablet} = useWebMediaQueries() const searchDebounceTimeout = React.useRef<NodeJS.Timeout | undefined>( @@ -490,14 +489,9 @@ export function SearchScreenMobile( useFocusEffect( React.useCallback(() => { - const softResetSub = store.onScreenSoftReset(onSoftReset) - setMinimalShellMode(false) - - return () => { - softResetSub.remove() - } - }, [store, onSoftReset, setMinimalShellMode]), + return listenSoftReset(onSoftReset) + }, [onSoftReset, setMinimalShellMode]), ) return ( |