mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-25 11:05:25 +00:00
Fixed message request UI still visible after tapping on accept
This commit is contained in:
parent
abd689cfd3
commit
2b0e8a966a
@ -1024,13 +1024,13 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
lifecycleScope.launch {
|
lifecycleScope.launch {
|
||||||
repeatOnLifecycle(Lifecycle.State.STARTED) {
|
repeatOnLifecycle(Lifecycle.State.STARTED) {
|
||||||
viewModel.uiState
|
viewModel.uiState
|
||||||
.map { it.messageRequestState }
|
.map { it.messageRequestState }
|
||||||
.distinctUntilChanged()
|
.distinctUntilChanged()
|
||||||
.collectLatest { state ->
|
.collectLatest { state ->
|
||||||
binding.messageRequestBar.isVisible = state != MessageRequestUiState.Invisible
|
binding.messageRequestBar.isVisible = state is MessageRequestUiState.Visible
|
||||||
|
|
||||||
if (state is MessageRequestUiState.Visible) {
|
if (state is MessageRequestUiState.Visible) {
|
||||||
binding.sendAcceptsTextView.setText(state.acceptButtonText)
|
binding.sendAcceptsTextView.setText(state.acceptButtonText)
|
||||||
|
Loading…
Reference in New Issue
Block a user