mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-17 04:20:00 +03:00
Clear composer text when canceling message edit
Change-Id: Ib1641b55ef6c214a15523c7045e5f20885db84e6
This commit is contained in:
parent
6532a4e999
commit
7e4b08155e
1 changed files with 2 additions and 1 deletions
|
@ -158,7 +158,8 @@ class MessageComposerViewModel @AssistedInject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun handleEnterRegularMode(action: MessageComposerAction.EnterRegularMode) = setState {
|
private fun handleEnterRegularMode(action: MessageComposerAction.EnterRegularMode) = setState {
|
||||||
copy(sendMode = SendMode.Regular(currentComposerText, action.fromSharing))
|
val newText = if (sendMode is SendMode.Edit) "" else currentComposerText
|
||||||
|
copy(sendMode = SendMode.Regular(newText, action.fromSharing))
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun handleEnterEditMode(action: MessageComposerAction.EnterEditMode) {
|
private fun handleEnterEditMode(action: MessageComposerAction.EnterEditMode) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue