Fix issue of send button not displayed when starting message with a space.

This commit is contained in:
Benoit Marty 2023-01-13 10:36:03 +01:00
parent b1d2581bf3
commit cad5e732df

View file

@ -138,7 +138,7 @@ class MessageComposerViewModel @AssistedInject constructor(
}
private fun handleOnTextChanged(action: MessageComposerAction.OnTextChanged) {
val needsSendButtonVisibilityUpdate = currentComposerText.isEmpty() != action.text.isEmpty()
val needsSendButtonVisibilityUpdate = currentComposerText.isBlank() != action.text.isBlank()
currentComposerText = SpannableString(action.text)
if (needsSendButtonVisibilityUpdate) {
updateIsSendButtonVisibility(true)