mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2024-12-17 17:20:21 +01:00
android: hide keyboard when not needed (#4689)
* android: hide keyboard when not needed * revert some parts * more places * unused * delay * comment
This commit is contained in:
committed by
GitHub
parent
e9baeba31f
commit
789c762c81
+10
-2
@@ -36,11 +36,12 @@ import chat.simplex.common.model.ChatController.appPrefs
|
||||
import chat.simplex.common.model.ChatModel
|
||||
import chat.simplex.common.ui.theme.CurrentColors
|
||||
import chat.simplex.common.views.chat.*
|
||||
import chat.simplex.common.views.helpers.SharedContent
|
||||
import chat.simplex.common.views.helpers.generalGetString
|
||||
import chat.simplex.common.views.helpers.*
|
||||
import chat.simplex.res.MR
|
||||
import dev.icerock.moko.resources.StringResource
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.flow.collect
|
||||
import kotlinx.coroutines.flow.filter
|
||||
import java.lang.reflect.Field
|
||||
import java.net.URI
|
||||
|
||||
@@ -84,6 +85,13 @@ actual fun PlatformTextField(
|
||||
freeFocus = true
|
||||
}
|
||||
}
|
||||
LaunchedEffect(Unit) {
|
||||
snapshotFlow { ModalManager.start.modalCount.value }
|
||||
.filter { it > 0 }
|
||||
.collect {
|
||||
freeFocus = true
|
||||
}
|
||||
}
|
||||
|
||||
val isRtl = LocalLayoutDirection.current == LayoutDirection.Rtl
|
||||
AndroidView(modifier = Modifier, factory = {
|
||||
|
||||
Reference in New Issue
Block a user