mirror of
https://github.com/nextcloud/talk-android
synced 2025-01-19 05:30:15 +00:00
Merge pull request #4551 from nextcloud/show_send_button
show message send button when there is text in input message field
This commit is contained in:
commit
585f66d8ab
@ -474,7 +474,13 @@ class MessageInputFragment : Fragment() {
|
|||||||
|
|
||||||
@Suppress("ClickableViewAccessibility", "CyclomaticComplexMethod", "LongMethod")
|
@Suppress("ClickableViewAccessibility", "CyclomaticComplexMethod", "LongMethod")
|
||||||
private fun initVoiceRecordButton() {
|
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.inputEditText.doAfterTextChanged {
|
||||||
binding.fragmentMessageInputView.recordAudioButton.visibility =
|
binding.fragmentMessageInputView.recordAudioButton.visibility =
|
||||||
if (binding.fragmentMessageInputView.inputEditText.text.isEmpty()) View.VISIBLE else View.GONE
|
if (binding.fragmentMessageInputView.inputEditText.text.isEmpty()) View.VISIBLE else View.GONE
|
||||||
|
Loading…
Reference in New Issue
Block a user