Skip to content

Commit

Permalink
fix: MLS degraded dialogs [WPB-6607] (#2715)
Browse files Browse the repository at this point in the history
Co-authored-by: boris <[email protected]>
Co-authored-by: Boris Safonov <[email protected]>
  • Loading branch information
3 people authored Feb 19, 2024
1 parent 0df0e03 commit bbeeb09
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ fun ConversationScreen(
ConversationScreenDialogType.VERIFICATION_DEGRADED -> {
SureAboutCallingInDegradedConversationDialog(
callAnyway = {
conversationCallViewModel.onApplyConversationDegradation()
startCallIfPossible(
conversationCallViewModel,
showDialog,
Expand All @@ -288,7 +289,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 @@ -178,7 +178,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
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ class DeviceDetailsViewModelTest {
MockKAnnotations.init(this, relaxUnitFun = true)
withFingerprintSuccess()
coEvery { observeUserInfo(any()) } returns flowOf(GetUserInfoResult.Success(TestUser.OTHER_USER, null))
coEvery { getE2eiCertificate(any()) } returns GetE2EICertificateUseCaseResult.Failure.NotActivated
coEvery { getE2eiCertificate(any()) } returns GetE2EICertificateUseCaseResult.NotActivated
coEvery { isE2EIEnabledUseCase() } returns true
}

Expand Down
2 changes: 1 addition & 1 deletion kalium
Submodule kalium updated 30 files
+1 βˆ’1 .github/workflows/gradle-ios-tests.yml
+4 βˆ’4 logic/src/commonMain/kotlin/com/wire/kalium/logic/configuration/UserConfigRepository.kt
+2 βˆ’2 logic/src/commonMain/kotlin/com/wire/kalium/logic/data/conversation/MLSConversationRepository.kt
+3 βˆ’0 logic/src/commonMain/kotlin/com/wire/kalium/logic/data/user/UserRepository.kt
+2 βˆ’0 ...commonMain/kotlin/com/wire/kalium/logic/feature/conversation/MLSConversationsVerificationStatusesHandler.kt
+7 βˆ’6 logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/e2ei/usecase/GetE2EICertificateUseCase.kt
+25 βˆ’29 logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/user/ObserveE2EIRequiredUseCase.kt
+31 βˆ’30 logic/src/commonTest/kotlin/com/wire/kalium/logic/data/conversation/MLSConversationRepositoryTest.kt
+29 βˆ’0 logic/src/commonTest/kotlin/com/wire/kalium/logic/data/user/UserRepositoryTest.kt
+25 βˆ’38 logic/src/commonTest/kotlin/com/wire/kalium/logic/feature/client/ObserveE2EIRequiredUseCaseTest.kt
+26 βˆ’0 ...onTest/kotlin/com/wire/kalium/logic/feature/conversation/MLSConversationsVerificationStatusesHandlerTest.kt
+27 βˆ’5 logic/src/commonTest/kotlin/com/wire/kalium/logic/feature/e2ei/GetE2eiCertificateUseCaseTest.kt
+9 βˆ’0 ...rc/commonTest/kotlin/com/wire/kalium/logic/util/arrangement/repository/ConversationRepositoryArrangement.kt
+25 βˆ’12 monkeys/README.md
+5 βˆ’0 monkeys/schema.json
+1 βˆ’0 monkeys/src/main/kotlin/com/wire/kalium/monkeys/Utils.kt
+12 βˆ’5 monkeys/src/main/kotlin/com/wire/kalium/monkeys/conversation/LocalMonkey.kt
+1 βˆ’0 monkeys/src/main/kotlin/com/wire/kalium/monkeys/model/TestData.kt
+30 βˆ’10 monkeys/src/main/kotlin/com/wire/kalium/monkeys/model/TestDataImporter.kt
+27 βˆ’4 monkeys/src/main/kotlin/com/wire/kalium/monkeys/model/UserData.kt
+3 βˆ’2 monkeys/src/main/kotlin/com/wire/kalium/monkeys/server/MonkeyServer.kt
+5 βˆ’4 monkeys/src/main/kotlin/com/wire/kalium/monkeys/server/routes/Monkey.kt
+1 βˆ’1 network/src/commonMain/kotlin/com/wire/kalium/network/BackendMetaDataUtil.kt
+3 βˆ’2 network/src/commonMain/kotlin/com/wire/kalium/network/networkContainer/AuthenticatedNetworkContainer.kt
+3 βˆ’2 network/src/commonMain/kotlin/com/wire/kalium/network/networkContainer/UnauthenticatedNetworkContainer.kt
+7 βˆ’0 network/src/commonTest/kotlin/com/wire/kalium/api/common/SupportedApiVersionTest.kt
+1 βˆ’0 persistence/src/commonMain/db_global/migrations/7.sqm
+4 βˆ’3 persistence/src/commonMain/db_user/com/wire/kalium/persistence/Conversations.sq
+10 βˆ’7 persistence/src/commonMain/kotlin/com/wire/kalium/persistence/config/UserConfigStorage.kt
+160 βˆ’141 persistence/src/commonTest/kotlin/com/wire/kalium/persistence/dao/ConversationDAOTest.kt

0 comments on commit bbeeb09

Please sign in to comment.