mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-03-30 22:55:48 +00:00
android: fix entering characters while sending a message (#5615)
This commit is contained in:
committed by
GitHub
parent
a91599543e
commit
38c5c19b17
@@ -122,8 +122,10 @@ actual fun PlatformTextField(
|
||||
}
|
||||
|
||||
override fun onSelectionChanged(selStart: Int, selEnd: Int) {
|
||||
onMessageChange(ComposeMessage(text.toString(), TextRange(minOf(selStart, selEnd), maxOf(selStart, selEnd))))
|
||||
super.onSelectionChanged(selStart, selEnd)
|
||||
val start = minOf(text.length, minOf(selStart, selEnd))
|
||||
val end = minOf(text.length, maxOf(selStart, selEnd))
|
||||
onMessageChange(ComposeMessage(text.toString(), TextRange(start, end)))
|
||||
super.onSelectionChanged(start, end)
|
||||
}
|
||||
}
|
||||
editText.layoutParams = ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
|
||||
|
||||
Reference in New Issue
Block a user