From 2395d72c93da67871c5a2d4ed61d8f93978481c0 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 27 May 2024 10:35:02 +0200 Subject: [PATCH] Fix regression on send button visibility. --- .../home/room/detail/composer/MessageComposerViewModel.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/composer/MessageComposerViewModel.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/composer/MessageComposerViewModel.kt index 21747ceea6..648c88b4d2 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/composer/MessageComposerViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/composer/MessageComposerViewModel.kt @@ -16,6 +16,7 @@ package im.vector.app.features.home.room.detail.composer +import android.text.SpannableString import androidx.lifecycle.asFlow import com.airbnb.mvrx.MavericksViewModelFactory import com.airbnb.mvrx.withState @@ -150,7 +151,7 @@ class MessageComposerViewModel @AssistedInject constructor( private fun handleOnTextChanged(action: MessageComposerAction.OnTextChanged) { val needsSendButtonVisibilityUpdate = currentComposerText.isBlank() != action.text.isBlank() - currentComposerText = action.text + currentComposerText = SpannableString(action.text) if (needsSendButtonVisibilityUpdate) { updateIsSendButtonVisibility(true) }