Refactor minimal shell mode to refcounting (#10319)
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user