Using trim and empty to capture semantic concept of nothing being in there

This commit is contained in:
ThomasSession 2024-06-24 17:26:36 +10:00
parent 48aacae6c5
commit 031a18061d

View File

@ -120,7 +120,7 @@ class InputBar : RelativeLayout, InputBarEditTextDelegate, QuoteViewDelegate, Li
// region Updating
override fun inputBarEditTextContentChanged(text: CharSequence) {
microphoneButton.isVisible = text.all { it.isWhitespace() }
microphoneButton.isVisible = text.trim().isEmpty()
sendButton.isVisible = microphoneButton.isGone
delegate?.inputBarEditTextContentChanged(text)
}