This commit is contained in:
Andrew 2023-10-17 11:32:11 +10:30 committed by GitHub
commit 025fcbc064
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -13,6 +13,7 @@ import android.view.MotionEvent
import android.view.inputmethod.EditorInfo
import android.widget.RelativeLayout
import android.widget.TextView
import androidx.core.view.isGone
import androidx.core.view.isVisible
import network.loki.messenger.R
import network.loki.messenger.databinding.ViewInputBarBinding
@ -118,8 +119,8 @@ class InputBar : RelativeLayout, InputBarEditTextDelegate, QuoteViewDelegate, Li
// region Updating
override fun inputBarEditTextContentChanged(text: CharSequence) {
sendButton.isVisible = text.isNotEmpty()
microphoneButton.isVisible = text.isEmpty()
microphoneButton.isVisible = text.all { it.isWhitespace() }
sendButton.isVisible = microphoneButton.isGone
delegate?.inputBarEditTextContentChanged(text)
}