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)