mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-22 19:42:13 +00:00
android: create contacts with group members (#3078)
This commit is contained in:
1 parent
648a9761f9
commit
ae6996b2ee
18 files changed
+430
-112
No files matched your search
+11
-1
@@ -33,6 +33,7 @@ import kotlin.text.substring
|
||||
@Composable
|
||||
actual fun PlatformTextField(
|
||||
composeState: MutableState<ComposeState>,
|
||||
sendMsgEnabled: Boolean,
|
||||
textStyle: MutableState<TextStyle>,
|
||||
showDeleteTextButton: MutableState<Boolean>,
|
||||
userIsObserver: Boolean,
|
||||
@@ -42,6 +43,7 @@ actual fun PlatformTextField(
|
||||
) {
|
||||
val cs = composeState.value
|
||||
val focusRequester = remember { FocusRequester() }
|
||||
val focusManager = LocalFocusManager.current
|
||||
val keyboard = LocalSoftwareKeyboardController.current
|
||||
val padding = PaddingValues(12.dp, 12.dp, 45.dp, 0.dp)
|
||||
LaunchedEffect(cs.contextItem) {
|
||||
@@ -51,6 +53,13 @@ actual fun PlatformTextField(
|
||||
delay(50)
|
||||
keyboard?.show()
|
||||
}
|
||||
LaunchedEffect(sendMsgEnabled) {
|
||||
if (!sendMsgEnabled) {
|
||||
focusManager.clearFocus()
|
||||
delay(50)
|
||||
keyboard?.hide()
|
||||
}
|
||||
}
|
||||
val isRtl = remember(cs.message) { isRtl(cs.message.subSequence(0, min(50, cs.message.length))) }
|
||||
var textFieldValueState by remember { mutableStateOf(TextFieldValue(text = cs.message)) }
|
||||
val textFieldValue = textFieldValueState.copy(text = cs.message)
|
||||
@@ -113,7 +122,8 @@ actual fun PlatformTextField(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
)
|
||||
showDeleteTextButton.value = cs.message.split("\n").size >= 4 && !cs.inProgress
|
||||
if (composeState.value.preview is ComposePreview.VoicePreview) {
|
||||
|
||||
Reference in new issue
Block a user