Keep the current message formatting when switching between composer mode (Regular, Reply, etc.)
This commit is contained in:
parent
423b9215c4
commit
6a30a2ed32
|
@ -404,7 +404,7 @@ class MessageComposerFragment : VectorBaseFragment<FragmentComposerBinding>(), A
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onTextChanged(text: CharSequence) {
|
override fun onTextChanged(text: CharSequence) {
|
||||||
messageComposerViewModel.handle(MessageComposerAction.OnTextChanged(text))
|
messageComposerViewModel.handle(MessageComposerAction.OnTextChanged(composer.formattedText ?: text))
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onFullScreenModeChanged() = withState(messageComposerViewModel) { state ->
|
override fun onFullScreenModeChanged() = withState(messageComposerViewModel) { state ->
|
||||||
|
|
|
@ -151,7 +151,7 @@ class MessageComposerViewModel @AssistedInject constructor(
|
||||||
|
|
||||||
private fun handleOnTextChanged(action: MessageComposerAction.OnTextChanged) {
|
private fun handleOnTextChanged(action: MessageComposerAction.OnTextChanged) {
|
||||||
val needsSendButtonVisibilityUpdate = currentComposerText.isBlank() != action.text.isBlank()
|
val needsSendButtonVisibilityUpdate = currentComposerText.isBlank() != action.text.isBlank()
|
||||||
currentComposerText = SpannableString(action.text)
|
currentComposerText = action.text
|
||||||
if (needsSendButtonVisibilityUpdate) {
|
if (needsSendButtonVisibilityUpdate) {
|
||||||
updateIsSendButtonVisibility(true)
|
updateIsSendButtonVisibility(true)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue