mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-06-03 21:21:46 +00:00
Merge branch 'stable'
This commit is contained in:
+2
@@ -69,3 +69,5 @@ actual fun hideKeyboard(view: Any?) {
|
||||
(androidAppContext.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager).hideSoftInputFromWindow(view.windowToken, 0)
|
||||
}
|
||||
}
|
||||
|
||||
actual fun androidIsFinishingMainActivity(): Boolean = (mainActivity.get()?.isFinishing == true)
|
||||
|
||||
@@ -150,7 +150,7 @@ fun MainScreen() {
|
||||
LaunchedEffect(Unit) {
|
||||
// With these constrains when user presses back button while on ChatList, activity destroys and shows auth request
|
||||
// while the screen moves to a launcher. Detect it and prevent showing the auth
|
||||
if (!(AppLock.destroyedAfterBackPress.value && chatModel.controller.appPrefs.laMode.get() == LAMode.SYSTEM)) {
|
||||
if (!(androidIsFinishingMainActivity() && chatModel.controller.appPrefs.laMode.get() == LAMode.SYSTEM)) {
|
||||
AppLock.runAuthenticate()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ object AppLock {
|
||||
|
||||
// Remember result and show it after orientation change
|
||||
val laFailed = mutableStateOf(false)
|
||||
val destroyedAfterBackPress = mutableStateOf(false)
|
||||
|
||||
fun clearAuthState() {
|
||||
userAuthorized.value = null
|
||||
|
||||
@@ -14,3 +14,5 @@ expect fun LocalMultiplatformView(): Any?
|
||||
@Composable
|
||||
expect fun getKeyboardState(): State<KeyboardState>
|
||||
expect fun hideKeyboard(view: Any?)
|
||||
|
||||
expect fun androidIsFinishingMainActivity(): Boolean
|
||||
|
||||
+2
@@ -17,3 +17,5 @@ actual fun LocalMultiplatformView(): Any? = null
|
||||
@Composable
|
||||
actual fun getKeyboardState(): State<KeyboardState> = remember { mutableStateOf(KeyboardState.Opened) }
|
||||
actual fun hideKeyboard(view: Any?) {}
|
||||
|
||||
actual fun androidIsFinishingMainActivity(): Boolean = false
|
||||
|
||||
Reference in New Issue
Block a user