mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-26 15:05:44 +03:00
message draft bug fix
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
This commit is contained in:
parent
993cee0f3a
commit
e1f538a9e6
1 changed files with 7 additions and 1 deletions
|
@ -1004,7 +1004,11 @@ class ChatActivity :
|
|||
@SuppressLint("ClickableViewAccessibility")
|
||||
private fun initVoiceRecordButton() {
|
||||
if (!isVoiceRecordingLocked) {
|
||||
showMicrophoneButton(true)
|
||||
if (binding.messageInputView.messageInput.text!!.isNotEmpty()) {
|
||||
showMicrophoneButton(false)
|
||||
} else {
|
||||
showMicrophoneButton(true)
|
||||
}
|
||||
} else if (isVoiceRecordingInProgress) {
|
||||
binding.messageInputView.playPauseBtn.visibility = View.GONE
|
||||
binding.messageInputView.seekBar.visibility = View.GONE
|
||||
|
@ -3979,9 +3983,11 @@ class ChatActivity :
|
|||
|
||||
private fun showMicrophoneButton(show: Boolean) {
|
||||
if (show && CapabilitiesUtilNew.hasSpreedFeatureCapability(conversationUser, "voice-message-sharing")) {
|
||||
Log.d(TAG, "Microphone shown")
|
||||
binding.messageInputView.messageSendButton.visibility = View.GONE
|
||||
binding.messageInputView.recordAudioButton.visibility = View.VISIBLE
|
||||
} else {
|
||||
Log.d(TAG, "Microphone hidden")
|
||||
binding.messageInputView.messageSendButton.visibility = View.VISIBLE
|
||||
binding.messageInputView.recordAudioButton.visibility = View.GONE
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue