mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-25 10:55:55 +03:00
Fix new line and enter key presses deleting existing text in some keyboards (#7437)
This commit is contained in:
parent
ce35472824
commit
76ead3f344
2 changed files with 3 additions and 2 deletions
1
changelog.d/7357.bugfix
Normal file
1
changelog.d/7357.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
New line and Enter hardware key presses deleting existing text in some keyboards.
|
|
@ -294,11 +294,11 @@ class MessageComposerFragment : VectorBaseFragment<FragmentComposerBinding>(), A
|
|||
!keyEvent.isShiftPressed &&
|
||||
keyEvent.keyCode == KeyEvent.KEYCODE_ENTER &&
|
||||
resources.configuration.keyboard != Configuration.KEYBOARD_NOKEYS
|
||||
val result = if (isSendAction || externalKeyboardPressedEnter) {
|
||||
val sendMessageWithEnter = externalKeyboardPressedEnter && vectorPreferences.sendMessageWithEnter()
|
||||
val result = if (isSendAction || sendMessageWithEnter) {
|
||||
sendTextMessage(v.text)
|
||||
true
|
||||
} else false
|
||||
composer.setTextIfDifferent(null)
|
||||
result
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue