Skip to content

Commit

Permalink
fix: MLS degraded dialogs [WPB-6607] (#2712)
Browse files Browse the repository at this point in the history
  • Loading branch information
borichellow authored Feb 15, 2024
1 parent d8a31c8 commit 54530b7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ fun ConversationScreen(
ConversationScreenDialogType.VERIFICATION_DEGRADED -> {
SureAboutCallingInDegradedConversationDialog(
callAnyway = {
conversationCallViewModel.onApplyConversationDegradation()
startCallIfPossible(
conversationCallViewModel,
showDialog,
Expand All @@ -293,7 +294,6 @@ fun ConversationScreen(
},
onDialogDismiss = { showDialog.value = ConversationScreenDialogType.NONE }
)
conversationCallViewModel.onConversationDegradedDialogShown()
}

ConversationScreenDialogType.NONE -> {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -525,11 +525,7 @@ class MessageComposerViewModel @Inject constructor(
}

fun dismissSureAboutSendingMessage() {
(sureAboutMessagingDialogState as? SureAboutMessagingDialogState.Visible)?.let {
viewModelScope.launch {
it.markAsNotified()
}
}
sureAboutMessagingDialogState = SureAboutMessagingDialogState.Hidden
}

private suspend fun SureAboutMessagingDialogState.markAsNotified() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class ConversationCallViewModel @Inject constructor(
suspend fun isConferenceCallingEnabled(conversationType: Conversation.Type): ConferenceCallingResult =
isConferenceCallingEnabled.invoke(conversationId, conversationType)

fun onConversationDegradedDialogShown() {
fun onApplyConversationDegradation() {
viewModelScope.launch {
setUserInformedAboutVerification.invoke(conversationId)
}
Expand Down

0 comments on commit 54530b7

Please sign in to comment.