Refactor minimal shell mode to refcounting (#10319)

This commit is contained in:
Samuel Newman
2026-04-21 13:04:02 -07:00
committed by GitHub
parent 6d53459e92
commit 3153ea4302
40 changed files with 152 additions and 393 deletions
+3 -8
View File
@@ -1,4 +1,4 @@
import {useCallback, useLayoutEffect, useState} from 'react'
import {useState} from 'react'
import {LayoutAnimationConfig} from 'react-native-reanimated'
import {msg} from '@lingui/core/macro'
import {useLingui} from '@lingui/react'
@@ -8,7 +8,7 @@ import {
type AllNavigatorParams,
type NativeStackScreenProps,
} from '#/lib/routes/types'
import {useSetMinimalShellMode} from '#/state/shell'
import {useEnableMinimalShellMode} from '#/state/shell'
import {ErrorScreen} from '#/view/com/util/error/ErrorScreen'
import {FindContactsFlow} from '#/components/contacts/FindContactsFlow'
import {useFindContactsFlowState} from '#/components/contacts/state'
@@ -36,12 +36,7 @@ export function FindContactsFlowScreen({navigation}: Props) {
})
})
const setMinimalShellMode = useSetMinimalShellMode()
const effect = useCallback(() => {
setMinimalShellMode(true)
return () => setMinimalShellMode(false)
}, [setMinimalShellMode])
useLayoutEffect(effect)
useEnableMinimalShellMode()
return (
<Layout.Screen>