From 2b0e8a966aa0470b5f505e84e14358fdeff18795 Mon Sep 17 00:00:00 2001 From: SessionHero01 <180888785+SessionHero01@users.noreply.github.com> Date: Wed, 30 Oct 2024 14:43:37 +1100 Subject: [PATCH] Fixed message request UI still visible after tapping on accept --- .../securesms/conversation/v2/ConversationActivityV2.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt index 8e5549b964..c6b8ea1fcd 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt @@ -1024,13 +1024,13 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe } } - lifecycleScope.launch { + lifecycleScope.launch { repeatOnLifecycle(Lifecycle.State.STARTED) { viewModel.uiState .map { it.messageRequestState } .distinctUntilChanged() .collectLatest { state -> - binding.messageRequestBar.isVisible = state != MessageRequestUiState.Invisible + binding.messageRequestBar.isVisible = state is MessageRequestUiState.Visible if (state is MessageRequestUiState.Visible) { binding.sendAcceptsTextView.setText(state.acceptButtonText)