about summary refs log tree commit diff
path: root/src/state/models/ui
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2023-11-07 13:37:47 -0600
committerGitHub <noreply@github.com>2023-11-07 11:37:47 -0800
commitbfe196bac5e618bfbeab4f6fabef3e5a18194868 (patch)
treef3fd74b8472f5bcd3bbcf3b111a0f19b059de404 /src/state/models/ui
parent7158157f5fe07b8f97842736ea87b598baabb7da (diff)
downloadvoidsky-bfe196bac5e618bfbeab4f6fabef3e5a18194868.tar.zst
Extract shell state into separate context (#1824)
* WIP

* Add shell state

* Integrate new shell state for drawer and minimal shell mode

* Replace isDrawerSwipeDisabled

* Split shell state into separate contexts to avoid needless re-renders

* Fix typo

---------

Co-authored-by: Paul Frazee <pfrazee@gmail.com>
Diffstat (limited to 'src/state/models/ui')
-rw-r--r--src/state/models/ui/shell.ts26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/state/models/ui/shell.ts b/src/state/models/ui/shell.ts
index 9c0cc6e30..d690b9331 100644
--- a/src/state/models/ui/shell.ts
+++ b/src/state/models/ui/shell.ts
@@ -266,9 +266,6 @@ export interface ComposerOpts {
 
 export class ShellUiModel {
   colorMode: ColorMode = 'system'
-  minimalShellMode = false
-  isDrawerOpen = false
-  isDrawerSwipeDisabled = false
   isModalActive = false
   activeModals: Modal[] = []
   isLightboxActive = false
@@ -313,10 +310,6 @@ export class ShellUiModel {
     }
   }
 
-  setMinimalShellMode(v: boolean) {
-    this.minimalShellMode = v
-  }
-
   /**
    * returns true if something was closed
    * (used by the android hardware back btn)
@@ -334,10 +327,6 @@ export class ShellUiModel {
       this.closeComposer()
       return true
     }
-    if (this.isDrawerOpen) {
-      this.closeDrawer()
-      return true
-    }
     return false
   }
 
@@ -354,21 +343,6 @@ export class ShellUiModel {
     if (this.isComposerActive) {
       this.closeComposer()
     }
-    if (this.isDrawerOpen) {
-      this.closeDrawer()
-    }
-  }
-
-  openDrawer() {
-    this.isDrawerOpen = true
-  }
-
-  closeDrawer() {
-    this.isDrawerOpen = false
-  }
-
-  setIsDrawerSwipeDisabled(v: boolean) {
-    this.isDrawerSwipeDisabled = v
   }
 
   openModal(modal: Modal) {