···11import React from 'react'
2233import {isWeb} from '#/platform/detection'
44-import {DialogControlRefProps} from '#/components/Dialog'
44+import {type DialogControlRefProps} from '#/components/Dialog'
55import {Provider as GlobalDialogsProvider} from '#/components/dialogs/Context'
66import {BottomSheetNativeComponent} from '../../../modules/bottom-sheet'
77···2222interface IDialogControlContext {
2323 closeAllDialogs(): boolean
2424 setDialogIsOpen(id: string, isOpen: boolean): void
2525- /**
2626- * The number of dialogs that are fully expanded. This is used to determine the backgground color of the status bar
2727- * on iOS.
2828- */
2929- fullyExpandedCount: number
3025 setFullyExpandedCount: React.Dispatch<React.SetStateAction<number>>
3126}
3227···3631 {} as IDialogControlContext,
3732)
38333434+/**
3535+ * The number of dialogs that are fully expanded. This is used to determine the background color of the status bar
3636+ * on iOS.
3737+ */
3838+const DialogFullyExpandedCountContext = React.createContext<number>(0)
3939+DialogFullyExpandedCountContext.displayName = 'DialogFullyExpandedCountContext'
4040+3941export function useDialogStateContext() {
4042 return React.useContext(DialogContext)
4143}
···4446 return React.useContext(DialogControlContext)
4547}
46484949+/** The number of dialogs that are fully expanded */
5050+export function useDialogFullyExpandedCountContext() {
5151+ return React.useContext(DialogFullyExpandedCountContext)
5252+}
5353+4754export function Provider({children}: React.PropsWithChildren<{}>) {
4855 const [fullyExpandedCount, setFullyExpandedCount] = React.useState(0)
4956···8592 () => ({
8693 closeAllDialogs,
8794 setDialogIsOpen,
8888- fullyExpandedCount,
8995 setFullyExpandedCount,
9096 }),
9191- [
9292- closeAllDialogs,
9393- setDialogIsOpen,
9494- fullyExpandedCount,
9595- setFullyExpandedCount,
9696- ],
9797+ [closeAllDialogs, setDialogIsOpen, setFullyExpandedCount],
9798 )
989999100 return (
100101 <DialogContext.Provider value={context}>
101102 <DialogControlContext.Provider value={controls}>
102102- <GlobalDialogsProvider>{children}</GlobalDialogsProvider>
103103+ <DialogFullyExpandedCountContext.Provider value={fullyExpandedCount}>
104104+ <GlobalDialogsProvider>{children}</GlobalDialogsProvider>
105105+ </DialogFullyExpandedCountContext.Provider>
103106 </DialogControlContext.Provider>
104107 </DialogContext.Provider>
105108 )
+2-2
src/view/shell/index.tsx
···1212import {useNotificationsRegistration} from '#/lib/notifications/notifications'
1313import {isStateAtTabRoot} from '#/lib/routes/helpers'
1414import {isAndroid, isIOS} from '#/platform/detection'
1515-import {useDialogStateControlContext} from '#/state/dialogs'
1515+import {useDialogFullyExpandedCountContext} from '#/state/dialogs'
1616import {useSession} from '#/state/session'
1717import {
1818 useIsDrawerOpen,
···181181}
182182183183export const Shell: React.FC = function ShellImpl() {
184184- const {fullyExpandedCount} = useDialogStateControlContext()
184184+ const fullyExpandedCount = useDialogFullyExpandedCountContext()
185185 const t = useTheme()
186186 useIntentHandler()
187187