Merge pull request #4284 from vector-im/feature/fga/fix_mic_button_visibility

Fix  voice message record button wrong visibility
This commit is contained in:
Benoit Marty 2021-10-21 12:39:50 +02:00 committed by GitHub
commit 486e769287
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

1
changelog.d/4283.bugfix Normal file
View file

@ -0,0 +1 @@
Fix voice message record button wrong visibility

View file

@ -1390,7 +1390,7 @@ class RoomDetailFragment @Inject constructor(
lazyLoadedViews.inviteView(false)?.isVisible = false
if (mainState.tombstoneEvent == null) {
views.composerLayout.isInvisible = !textComposerState.isComposerVisible
views.voiceMessageRecorderView.isVisible = !textComposerState.isSendButtonVisible
views.voiceMessageRecorderView.isVisible = textComposerState.isVoiceMessageRecorderVisible
views.composerLayout.views.sendButton.isInvisible = !textComposerState.isSendButtonVisible
views.composerLayout.setRoomEncrypted(summary.isEncrypted)
// views.composerLayout.alwaysShowSendButton = false

View file

@ -49,8 +49,8 @@ data class TextComposerViewState(
val sendMode: SendMode = SendMode.REGULAR("", false)
) : MavericksState {
val isComposerVisible: Boolean
get() = canSendMessage && !isVoiceRecording
val isComposerVisible = canSendMessage && !isVoiceRecording
val isVoiceMessageRecorderVisible = canSendMessage && !isSendButtonVisible
constructor(args: RoomDetailArgs) : this(roomId = args.roomId)
}