switch minimal shell mode to refcounting

This commit is contained in:
Samuel Newman
2026-04-21 21:04:14 +03:00
parent 2ab1e2c9e9
commit cb1ce33512
40 changed files with 186 additions and 402 deletions
+4 -12
View File
@@ -27,7 +27,6 @@ import {
useProfilesQuery,
} from '#/state/queries/profile'
import {useSession} from '#/state/session'
import {useSetMinimalShellMode} from '#/state/shell'
import {
makeSearchQuery,
type Params,
@@ -87,7 +86,6 @@ export function SearchScreenShell({
const route = useRoute()
const textInput = useRef<TextInput>(null)
const {t: l} = useLingui()
const setMinimalShellMode = useSetMinimalShellMode()
const {currentAccount} = useSession()
const queryClient = useQueryClient()
@@ -288,9 +286,8 @@ export function SearchScreenShell({
useFocusEffect(
useCallback(() => {
setMinimalShellMode(false)
return listenSoftReset(onSoftReset)
}, [onSoftReset, setMinimalShellMode]),
}, [onSoftReset]),
)
const onSearchInputFocus = useCallback(() => {
@@ -481,17 +478,12 @@ let SearchScreenInner = ({
focusSearchInput: (tab?: TabParam) => void
}): React.ReactNode => {
const t = useTheme()
const setMinimalShellMode = useSetMinimalShellMode()
const {hasSession} = useSession()
const {gtTablet} = useBreakpoints()
const onPageSelected = useCallback(
(index: number) => {
setMinimalShellMode(false)
setActiveTab(index)
},
[setActiveTab, setMinimalShellMode],
)
const onPageSelected = (index: number) => {
setActiveTab(index)
}
return queryWithParams ? (
<SearchResults