Android fixes (#515)
* Fix profile screen performance on android and remove dead code * Correctly handle android hardware back btn * Fix EditProfile modal for android * Fix lint
This commit is contained in:
parent
eb6b36be61
commit
d35f7c1f1a
11 changed files with 273 additions and 594 deletions
|
@ -194,6 +194,30 @@ export class ShellUiModel {
|
|||
this.minimalShellMode = v
|
||||
}
|
||||
|
||||
/**
|
||||
* returns true if something was closed
|
||||
* (used by the android hardware back btn)
|
||||
*/
|
||||
closeAnyActiveElement(): boolean {
|
||||
if (this.isLightboxActive) {
|
||||
this.closeLightbox()
|
||||
return true
|
||||
}
|
||||
if (this.isModalActive) {
|
||||
this.closeModal()
|
||||
return true
|
||||
}
|
||||
if (this.isComposerActive) {
|
||||
this.closeComposer()
|
||||
return true
|
||||
}
|
||||
if (this.isDrawerOpen) {
|
||||
this.closeDrawer()
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
openDrawer() {
|
||||
this.isDrawerOpen = true
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue