using project terminoloy for rendering ui states on views
This commit is contained in:
parent
9ce228c5bc
commit
cca50ed669
|
@ -1138,7 +1138,7 @@ class RoomDetailFragment @Inject constructor(
|
||||||
|
|
||||||
// We should improve the UX to support going into playback mode when paused and delete the media when the view is destroyed.
|
// We should improve the UX to support going into playback mode when paused and delete the media when the view is destroyed.
|
||||||
messageComposerViewModel.handle(MessageComposerAction.EndAllVoiceActions(deleteRecord = false))
|
messageComposerViewModel.handle(MessageComposerAction.EndAllVoiceActions(deleteRecord = false))
|
||||||
views.voiceMessageRecorderView.display(RecordingUiState.None)
|
views.voiceMessageRecorderView.render(RecordingUiState.None)
|
||||||
}
|
}
|
||||||
|
|
||||||
private val attachmentFileActivityResultLauncher = registerStartForActivityResult {
|
private val attachmentFileActivityResultLauncher = registerStartForActivityResult {
|
||||||
|
@ -1434,7 +1434,7 @@ class RoomDetailFragment @Inject constructor(
|
||||||
views.composerLayout.isInvisible = !messageComposerState.isComposerVisible
|
views.composerLayout.isInvisible = !messageComposerState.isComposerVisible
|
||||||
views.voiceMessageRecorderView.isVisible = messageComposerState.isVoiceMessageRecorderVisible
|
views.voiceMessageRecorderView.isVisible = messageComposerState.isVoiceMessageRecorderVisible
|
||||||
views.composerLayout.views.sendButton.isInvisible = !messageComposerState.isSendButtonVisible
|
views.composerLayout.views.sendButton.isInvisible = !messageComposerState.isSendButtonVisible
|
||||||
views.voiceMessageRecorderView.display(messageComposerState.voiceRecordingUiState)
|
views.voiceMessageRecorderView.render(messageComposerState.voiceRecordingUiState)
|
||||||
views.composerLayout.setRoomEncrypted(summary.isEncrypted)
|
views.composerLayout.setRoomEncrypted(summary.isEncrypted)
|
||||||
// views.composerLayout.alwaysShowSendButton = false
|
// views.composerLayout.alwaysShowSendButton = false
|
||||||
if (messageComposerState.canSendMessage) {
|
if (messageComposerState.canSendMessage) {
|
||||||
|
|
|
@ -103,7 +103,7 @@ class VoiceMessageRecorderView @JvmOverloads constructor(
|
||||||
voiceMessageViews.renderVisibilityChanged(parentChanged, visibility)
|
voiceMessageViews.renderVisibilityChanged(parentChanged, visibility)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun display(recordingState: RecordingUiState) {
|
fun render(recordingState: RecordingUiState) {
|
||||||
if (lastKnownState == recordingState) return
|
if (lastKnownState == recordingState) return
|
||||||
lastKnownState = recordingState
|
lastKnownState = recordingState
|
||||||
when (recordingState) {
|
when (recordingState) {
|
||||||
|
|
Loading…
Reference in New Issue