From 1c108c94f7271ef9537f2fb32f008d7f272ccb92 Mon Sep 17 00:00:00 2001 From: rapterjet2004 Date: Mon, 9 Dec 2024 10:42:02 -0600 Subject: [PATCH] Fixed overlay bug Signed-off-by: rapterjet2004 --- .../java/com/nextcloud/talk/chat/MessageInputFragment.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 047fec8135..ae04f09026 100644 --- a/app/src/main/java/com/nextcloud/talk/chat/MessageInputFragment.kt +++ b/app/src/main/java/com/nextcloud/talk/chat/MessageInputFragment.kt @@ -284,7 +284,8 @@ class MessageInputFragment : Fragment() { } binding.fragmentMessageInputView.attachmentButton.visibility = View.VISIBLE - binding.fragmentMessageInputView.recordAudioButton.visibility = View.VISIBLE + binding.fragmentMessageInputView.recordAudioButton.visibility = + if (binding.fragmentMessageInputView.inputEditText.text.isEmpty()) View.VISIBLE else View.GONE } else { binding.fragmentMessageInputView.attachmentButton.visibility = View.INVISIBLE binding.fragmentMessageInputView.recordAudioButton.visibility = View.INVISIBLE @@ -562,7 +563,7 @@ class MessageInputFragment : Fragment() { } else { chatActivity.chatViewModel.stopAndSendAudioRecording( chatActivity.roomToken, - chatActivity.currentConversation!!.displayName!!, + chatActivity.currentConversation!!.displayName, VOICE_MESSAGE_META_DATA ) } @@ -841,7 +842,7 @@ class MessageInputFragment : Fragment() { if (token == "") room = chatActivity.roomToken else room = token - chatActivity.chatViewModel.uploadFile(fileUri, room, chatActivity.currentConversation!!.displayName!!, metaData) + chatActivity.chatViewModel.uploadFile(fileUri, room, chatActivity.currentConversation!!.displayName, metaData) } private fun submitMessage(sendWithoutNotification: Boolean) {