diff --git a/app/src/main/java/com/nextcloud/talk/chat/MessageInputFragment.kt b/app/src/main/java/com/nextcloud/talk/chat/MessageInputFragment.kt index d73efeb22..b97ca345b 100644 --- a/app/src/main/java/com/nextcloud/talk/chat/MessageInputFragment.kt +++ b/app/src/main/java/com/nextcloud/talk/chat/MessageInputFragment.kt @@ -474,7 +474,13 @@ class MessageInputFragment : Fragment() { @Suppress("ClickableViewAccessibility", "CyclomaticComplexMethod", "LongMethod") private fun initVoiceRecordButton() { - binding.fragmentMessageInputView.messageSendButton.visibility = View.GONE + if (binding.fragmentMessageInputView.messageInput.text.isNullOrBlank()) { + binding.fragmentMessageInputView.messageSendButton.visibility = View.GONE + binding.fragmentMessageInputView.recordAudioButton.visibility = View.VISIBLE + } else { + binding.fragmentMessageInputView.messageSendButton.visibility = View.VISIBLE + binding.fragmentMessageInputView.recordAudioButton.visibility = View.GONE + } binding.fragmentMessageInputView.inputEditText.doAfterTextChanged { binding.fragmentMessageInputView.recordAudioButton.visibility = if (binding.fragmentMessageInputView.inputEditText.text.isEmpty()) View.VISIBLE else View.GONE