diff options
author | Samuel Newman <mozzius@protonmail.com> | 2024-06-11 04:10:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-11 05:10:57 +0200 |
commit | d85c8a09760aa91c080465840144b61155dc7ddf (patch) | |
tree | 2ccd90963836c98acc276c3399bb7e8bc9859ee2 /src/state/modals | |
parent | 14cddb7ec0a6088b5f2f89f61fc2a32656756f7a (diff) | |
download | voidsky-d85c8a09760aa91c080465840144b61155dc7ddf.tar.zst |
Revert to old modal on android (#4458)
* revert to old modal on android * close alf dialogs before closing composer * Try to fix white area * Use hook * Fix Back button * oops --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
Diffstat (limited to 'src/state/modals')
-rw-r--r-- | src/state/modals/index.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/state/modals/index.tsx b/src/state/modals/index.tsx index f8a64dc2d..ced14335b 100644 --- a/src/state/modals/index.tsx +++ b/src/state/modals/index.tsx @@ -169,11 +169,11 @@ const ModalContext = React.createContext<{ const ModalControlContext = React.createContext<{ openModal: (modal: Modal) => void closeModal: () => boolean - closeAllModals: () => void + closeAllModals: () => boolean }>({ openModal: () => {}, closeModal: () => false, - closeAllModals: () => {}, + closeAllModals: () => false, }) /** @@ -206,7 +206,9 @@ export function Provider({children}: React.PropsWithChildren<{}>) { }) const closeAllModals = useNonReactiveCallback(() => { + let wasActive = activeModals.length > 0 setActiveModals([]) + return wasActive }) unstable__openModal = openModal |