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>
This commit is contained in:
parent
14cddb7ec0
commit
d85c8a0976
6 changed files with 173 additions and 147 deletions
|
@ -1,9 +1,10 @@
|
|||
import {useCallback} from 'react'
|
||||
|
||||
import {useDialogStateControlContext} from '#/state/dialogs'
|
||||
import {useLightboxControls} from './lightbox'
|
||||
import {useModalControls} from './modals'
|
||||
import {useComposerControls} from './shell/composer'
|
||||
import {useSetDrawerOpen} from './shell/drawer-open'
|
||||
import {useDialogStateControlContext} from '#/state/dialogs'
|
||||
|
||||
/**
|
||||
* returns true if something was closed
|
||||
|
@ -22,10 +23,10 @@ export function useCloseAnyActiveElement() {
|
|||
if (closeModal()) {
|
||||
return true
|
||||
}
|
||||
if (closeComposer()) {
|
||||
if (closeAllDialogs()) {
|
||||
return true
|
||||
}
|
||||
if (closeAllDialogs()) {
|
||||
if (closeComposer()) {
|
||||
return true
|
||||
}
|
||||
setDrawerOpen(false)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue