Clear composer text when canceling message edit

Change-Id: Ib1641b55ef6c214a15523c7045e5f20885db84e6
This commit is contained in:
SpiritCroc 2022-12-03 11:36:45 +01:00
parent 6532a4e999
commit 7e4b08155e

View file

@ -158,7 +158,8 @@ class MessageComposerViewModel @AssistedInject constructor(
}
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) {