Skip to content

Commit

Permalink
Fix regression on send button visibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
bmarty committed May 27, 2024
1 parent a17c75a commit 2395d72
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 2395d72

Please sign in to comment.