From ec236a91e5b97762bb66e689936a2c3108e9b308 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Thu, 21 Mar 2024 11:19:09 -0500 Subject: [PATCH] Fix active/open dialogs state --- src/state/dialogs/index.tsx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/state/dialogs/index.tsx b/src/state/dialogs/index.tsx index 951105a509..0baf99174c 100644 --- a/src/state/dialogs/index.tsx +++ b/src/state/dialogs/index.tsx @@ -1,5 +1,6 @@ import React from 'react' import {SharedValue, useSharedValue} from 'react-native-reanimated' + import {DialogControlRefProps} from '#/components/Dialog' import {Provider as GlobalDialogsProvider} from '#/components/dialogs/Context' @@ -74,15 +75,11 @@ export function Provider({children}: React.PropsWithChildren<{}>) { const context = React.useMemo( () => ({ - activeDialogs: { - current: new Map(), - }, - openDialogs: { - current: new Set(), - }, + activeDialogs, + openDialogs, importantForAccessibility, }), - [importantForAccessibility], + [importantForAccessibility, activeDialogs, openDialogs], ) const controls = React.useMemo( () => ({closeAllDialogs, setDialogIsOpen}),