mobile: close modal views (#715)

This commit is contained in:
JRoberts
2022-05-31 20:55:19 +04:00
committed by GitHub
parent 0bb5774ff1
commit 15ddefe86b
5 changed files with 26 additions and 21 deletions
@@ -100,6 +100,7 @@ class MainActivity: FragmentActivity(), LifecycleEventObserver {
userAuthorized.value = true
} else {
userAuthorized.value = false
ModalManager.shared.closeModals()
authenticate(
generalGetString(R.string.auth_unlock),
generalGetString(R.string.auth_log_in_using_credential),
@@ -241,7 +242,9 @@ fun MainPage(
// this with LaunchedEffect(userAuthorized.value) fixes bottom sheet visibly collapsing after authentication
var chatsAccessAuthorized by remember { mutableStateOf(false) }
LaunchedEffect(userAuthorized.value) {
delay(500L)
if (chatModel.controller.appPrefs.performLA.get()) {
delay(500L)
}
chatsAccessAuthorized = userAuthorized.value == true
}
var showAdvertiseLAAlert by remember { mutableStateOf(false) }