Fix regression on send button visibility.

This commit is contained in:
Benoit Marty 2024-05-27 10:35:02 +02:00
parent a17c75a7da
commit 2395d72c93
1 changed files with 2 additions and 1 deletions

View File

@ -16,6 +16,7 @@
package im.vector.app.features.home.room.detail.composer package im.vector.app.features.home.room.detail.composer
import android.text.SpannableString
import androidx.lifecycle.asFlow import androidx.lifecycle.asFlow
import com.airbnb.mvrx.MavericksViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.withState import com.airbnb.mvrx.withState
@ -150,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 = action.text currentComposerText = SpannableString(action.text)
if (needsSendButtonVisibilityUpdate) { if (needsSendButtonVisibilityUpdate) {
updateIsSendButtonVisibility(true) updateIsSendButtonVisibility(true)
} }