diff options
Diffstat (limited to 'src/state/models')
-rw-r--r-- | src/state/models/ui/shell.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/state/models/ui/shell.ts b/src/state/models/ui/shell.ts index c6e7289df..a0e0cd7b2 100644 --- a/src/state/models/ui/shell.ts +++ b/src/state/models/ui/shell.ts @@ -279,6 +279,24 @@ export class ShellUiModel { return false } + /** + * used to clear out any modals, eg for a navigation + */ + closeAllActiveElements() { + if (this.isLightboxActive) { + this.closeLightbox() + } + while (this.isModalActive) { + this.closeModal() + } + if (this.isComposerActive) { + this.closeComposer() + } + if (this.isDrawerOpen) { + this.closeDrawer() + } + } + openDrawer() { this.isDrawerOpen = true } |