From 7e676539316f6654f058c3d99fc5771ac690c662 Mon Sep 17 00:00:00 2001 From: Oussama Hassine Date: Mon, 4 Dec 2023 10:53:15 +0100 Subject: [PATCH] fix: Update legal hold status class path (#2496) --- .../com/wire/android/GlobalObserversManager.kt | 2 +- .../com/wire/android/migration/MigrationMapper.kt | 3 ++- .../common/topappbar/CommonTopAppBarViewModel.kt | 2 +- .../ConversationListViewModel.kt | 2 +- .../wire/android/framework/TestConversation.kt | 15 ++++++++++----- .../android/framework/TestConversationDetails.kt | 2 +- .../MessageComposerViewModelArrangement.kt | 2 +- .../GroupConversationDetailsViewModelTest.kt | 5 +++-- .../ConversationMigrationViewModelTest.kt | 2 +- .../ui/home/gallery/MediaGalleryViewModelTest.kt | 5 +++-- .../NewConversationViewModelArrangement.kt | 3 ++- .../other/OtherUserProfileScreenViewModelTest.kt | 3 ++- kalium | 2 +- 13 files changed, 29 insertions(+), 19 deletions(-) diff --git a/app/src/main/kotlin/com/wire/android/GlobalObserversManager.kt b/app/src/main/kotlin/com/wire/android/GlobalObserversManager.kt index 8da0269e3ae..fb789b4f4ef 100644 --- a/app/src/main/kotlin/com/wire/android/GlobalObserversManager.kt +++ b/app/src/main/kotlin/com/wire/android/GlobalObserversManager.kt @@ -45,7 +45,7 @@ class GlobalObserversManager @Inject constructor( dispatcherProvider: DispatcherProvider, @KaliumCoreLogic private val coreLogic: CoreLogic, private val notificationManager: WireNotificationManager, - private val notificationChannelsManager: NotificationChannelsManager, + private val notificationChannelsManager: NotificationChannelsManager ) { private val scope = CoroutineScope(SupervisorJob() + dispatcherProvider.io()) diff --git a/app/src/main/kotlin/com/wire/android/migration/MigrationMapper.kt b/app/src/main/kotlin/com/wire/android/migration/MigrationMapper.kt index 72dbf33eb64..6ec59b58bed 100644 --- a/app/src/main/kotlin/com/wire/android/migration/MigrationMapper.kt +++ b/app/src/main/kotlin/com/wire/android/migration/MigrationMapper.kt @@ -107,7 +107,8 @@ class MigrationMapper @Inject constructor() { archived = false, archivedDateTime = null, mlsVerificationStatus = Conversation.VerificationStatus.NOT_VERIFIED, - proteusVerificationStatus = Conversation.VerificationStatus.NOT_VERIFIED + proteusVerificationStatus = Conversation.VerificationStatus.NOT_VERIFIED, + legalHoldStatus = Conversation.LegalHoldStatus.DISABLED ) } } diff --git a/app/src/main/kotlin/com/wire/android/ui/common/topappbar/CommonTopAppBarViewModel.kt b/app/src/main/kotlin/com/wire/android/ui/common/topappbar/CommonTopAppBarViewModel.kt index ac7597cf894..c55fa1d1184 100644 --- a/app/src/main/kotlin/com/wire/android/ui/common/topappbar/CommonTopAppBarViewModel.kt +++ b/app/src/main/kotlin/com/wire/android/ui/common/topappbar/CommonTopAppBarViewModel.kt @@ -31,7 +31,7 @@ import com.wire.android.util.CurrentScreen import com.wire.android.util.CurrentScreenManager import com.wire.kalium.logic.CoreLogic import com.wire.kalium.logic.data.call.Call -import com.wire.kalium.logic.data.conversation.LegalHoldStatus +import com.wire.kalium.logic.data.user.LegalHoldStatus import com.wire.kalium.logic.data.sync.SyncState import com.wire.kalium.logic.data.user.UserId import com.wire.kalium.logic.feature.legalhold.ObserveLegalHoldRequestUseCaseResult diff --git a/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/ConversationListViewModel.kt b/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/ConversationListViewModel.kt index 0e0b9a5a172..8c625e73f28 100644 --- a/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/ConversationListViewModel.kt +++ b/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/ConversationListViewModel.kt @@ -53,7 +53,7 @@ import com.wire.kalium.logic.data.conversation.ConversationDetails.Connection import com.wire.kalium.logic.data.conversation.ConversationDetails.Group import com.wire.kalium.logic.data.conversation.ConversationDetails.OneOne import com.wire.kalium.logic.data.conversation.ConversationDetails.Self -import com.wire.kalium.logic.data.conversation.LegalHoldStatus +import com.wire.kalium.logic.data.user.LegalHoldStatus import com.wire.kalium.logic.data.conversation.MutedConversationStatus import com.wire.kalium.logic.data.conversation.UnreadEventCount import com.wire.kalium.logic.data.id.ConversationId diff --git a/app/src/test/kotlin/com/wire/android/framework/TestConversation.kt b/app/src/test/kotlin/com/wire/android/framework/TestConversation.kt index 01af3d57d03..a19d5af45c3 100644 --- a/app/src/test/kotlin/com/wire/android/framework/TestConversation.kt +++ b/app/src/test/kotlin/com/wire/android/framework/TestConversation.kt @@ -53,7 +53,8 @@ object TestConversation { archived = false, archivedDateTime = null, mlsVerificationStatus = Conversation.VerificationStatus.NOT_VERIFIED, - proteusVerificationStatus = Conversation.VerificationStatus.NOT_VERIFIED + proteusVerificationStatus = Conversation.VerificationStatus.NOT_VERIFIED, + legalHoldStatus = Conversation.LegalHoldStatus.DISABLED ) val SELF = Conversation( ID.copy(value = "SELF ID"), @@ -75,7 +76,8 @@ object TestConversation { archived = false, archivedDateTime = null, mlsVerificationStatus = Conversation.VerificationStatus.NOT_VERIFIED, - proteusVerificationStatus = Conversation.VerificationStatus.NOT_VERIFIED + proteusVerificationStatus = Conversation.VerificationStatus.NOT_VERIFIED, + legalHoldStatus = Conversation.LegalHoldStatus.DISABLED ) fun GROUP(protocolInfo: ProtocolInfo = ProtocolInfo.Proteus) = Conversation( @@ -98,7 +100,8 @@ object TestConversation { archived = false, archivedDateTime = null, mlsVerificationStatus = Conversation.VerificationStatus.NOT_VERIFIED, - proteusVerificationStatus = Conversation.VerificationStatus.NOT_VERIFIED + proteusVerificationStatus = Conversation.VerificationStatus.NOT_VERIFIED, + legalHoldStatus = Conversation.LegalHoldStatus.DISABLED ) fun one_on_one(convId: ConversationId) = Conversation( @@ -121,7 +124,8 @@ object TestConversation { archived = false, archivedDateTime = null, mlsVerificationStatus = Conversation.VerificationStatus.NOT_VERIFIED, - proteusVerificationStatus = Conversation.VerificationStatus.NOT_VERIFIED + proteusVerificationStatus = Conversation.VerificationStatus.NOT_VERIFIED, + legalHoldStatus = Conversation.LegalHoldStatus.DISABLED ) val USER_1 = UserId("member1", "domainMember") @@ -151,6 +155,7 @@ object TestConversation { archived = false, archivedDateTime = null, mlsVerificationStatus = Conversation.VerificationStatus.NOT_VERIFIED, - proteusVerificationStatus = Conversation.VerificationStatus.NOT_VERIFIED + proteusVerificationStatus = Conversation.VerificationStatus.NOT_VERIFIED, + legalHoldStatus = Conversation.LegalHoldStatus.DISABLED ) } diff --git a/app/src/test/kotlin/com/wire/android/framework/TestConversationDetails.kt b/app/src/test/kotlin/com/wire/android/framework/TestConversationDetails.kt index 99bd8e9e654..91339750dc7 100644 --- a/app/src/test/kotlin/com/wire/android/framework/TestConversationDetails.kt +++ b/app/src/test/kotlin/com/wire/android/framework/TestConversationDetails.kt @@ -23,7 +23,7 @@ package com.wire.android.framework import com.wire.kalium.logic.data.conversation.Conversation import com.wire.kalium.logic.data.conversation.Conversation.ProtocolInfo import com.wire.kalium.logic.data.conversation.ConversationDetails -import com.wire.kalium.logic.data.conversation.LegalHoldStatus +import com.wire.kalium.logic.data.user.LegalHoldStatus import com.wire.kalium.logic.data.user.type.UserType object TestConversationDetails { diff --git a/app/src/test/kotlin/com/wire/android/ui/home/conversations/MessageComposerViewModelArrangement.kt b/app/src/test/kotlin/com/wire/android/ui/home/conversations/MessageComposerViewModelArrangement.kt index 81e71563dfb..c96f1df6b39 100644 --- a/app/src/test/kotlin/com/wire/android/ui/home/conversations/MessageComposerViewModelArrangement.kt +++ b/app/src/test/kotlin/com/wire/android/ui/home/conversations/MessageComposerViewModelArrangement.kt @@ -45,7 +45,7 @@ import com.wire.kalium.logic.CoreFailure import com.wire.kalium.logic.configuration.FileSharingStatus import com.wire.kalium.logic.data.conversation.Conversation import com.wire.kalium.logic.data.conversation.ConversationDetails -import com.wire.kalium.logic.data.conversation.LegalHoldStatus +import com.wire.kalium.logic.data.user.LegalHoldStatus import com.wire.kalium.logic.data.id.ConversationId import com.wire.kalium.logic.data.message.SelfDeletionTimer import com.wire.kalium.logic.data.sync.SyncState diff --git a/app/src/test/kotlin/com/wire/android/ui/home/conversations/details/GroupConversationDetailsViewModelTest.kt b/app/src/test/kotlin/com/wire/android/ui/home/conversations/details/GroupConversationDetailsViewModelTest.kt index e165479ba8a..b15a7b49dfd 100644 --- a/app/src/test/kotlin/com/wire/android/ui/home/conversations/details/GroupConversationDetailsViewModelTest.kt +++ b/app/src/test/kotlin/com/wire/android/ui/home/conversations/details/GroupConversationDetailsViewModelTest.kt @@ -35,7 +35,7 @@ import com.wire.android.ui.home.conversationslist.model.DialogState import com.wire.android.ui.navArgs import com.wire.kalium.logic.data.conversation.Conversation import com.wire.kalium.logic.data.conversation.ConversationDetails -import com.wire.kalium.logic.data.conversation.LegalHoldStatus +import com.wire.kalium.logic.data.user.LegalHoldStatus import com.wire.kalium.logic.data.conversation.MutedConversationStatus import com.wire.kalium.logic.data.id.ConversationId import com.wire.kalium.logic.data.id.TeamId @@ -593,7 +593,8 @@ class GroupConversationDetailsViewModelTest { archived = false, archivedDateTime = null, mlsVerificationStatus = Conversation.VerificationStatus.NOT_VERIFIED, - proteusVerificationStatus = Conversation.VerificationStatus.NOT_VERIFIED + proteusVerificationStatus = Conversation.VerificationStatus.NOT_VERIFIED, + legalHoldStatus = Conversation.LegalHoldStatus.DISABLED ), legalHoldStatus = LegalHoldStatus.DISABLED, hasOngoingCall = false, diff --git a/app/src/test/kotlin/com/wire/android/ui/home/conversations/migration/ConversationMigrationViewModelTest.kt b/app/src/test/kotlin/com/wire/android/ui/home/conversations/migration/ConversationMigrationViewModelTest.kt index 629168d25d4..aa7a04dfc83 100644 --- a/app/src/test/kotlin/com/wire/android/ui/home/conversations/migration/ConversationMigrationViewModelTest.kt +++ b/app/src/test/kotlin/com/wire/android/ui/home/conversations/migration/ConversationMigrationViewModelTest.kt @@ -25,7 +25,7 @@ import com.wire.android.framework.TestUser import com.wire.android.ui.home.conversations.ConversationNavArgs import com.wire.android.ui.navArgs import com.wire.kalium.logic.data.conversation.ConversationDetails -import com.wire.kalium.logic.data.conversation.LegalHoldStatus +import com.wire.kalium.logic.data.user.LegalHoldStatus import com.wire.kalium.logic.data.id.ConversationId import com.wire.kalium.logic.data.user.type.UserType import com.wire.kalium.logic.feature.conversation.ObserveConversationDetailsUseCase diff --git a/app/src/test/kotlin/com/wire/android/ui/home/gallery/MediaGalleryViewModelTest.kt b/app/src/test/kotlin/com/wire/android/ui/home/gallery/MediaGalleryViewModelTest.kt index e59862ddd9e..53db262f8fc 100644 --- a/app/src/test/kotlin/com/wire/android/ui/home/gallery/MediaGalleryViewModelTest.kt +++ b/app/src/test/kotlin/com/wire/android/ui/home/gallery/MediaGalleryViewModelTest.kt @@ -36,7 +36,7 @@ import com.wire.kalium.logic.CoreFailure import com.wire.kalium.logic.data.conversation.Conversation import com.wire.kalium.logic.data.conversation.ConversationDetails import com.wire.kalium.logic.data.conversation.ConversationDetails.OneOne -import com.wire.kalium.logic.data.conversation.LegalHoldStatus +import com.wire.kalium.logic.data.user.LegalHoldStatus import com.wire.kalium.logic.data.conversation.MutedConversationStatus.AllAllowed import com.wire.kalium.logic.data.id.QualifiedID import com.wire.kalium.logic.data.user.ConnectionState @@ -306,7 +306,8 @@ class MediaGalleryViewModelTest { archived = false, archivedDateTime = null, mlsVerificationStatus = Conversation.VerificationStatus.NOT_VERIFIED, - proteusVerificationStatus = Conversation.VerificationStatus.NOT_VERIFIED + proteusVerificationStatus = Conversation.VerificationStatus.NOT_VERIFIED, + legalHoldStatus = Conversation.LegalHoldStatus.DISABLED ), otherUser = OtherUser( QualifiedID("other-user-id", "domain-id"), diff --git a/app/src/test/kotlin/com/wire/android/ui/home/newconversation/NewConversationViewModelArrangement.kt b/app/src/test/kotlin/com/wire/android/ui/home/newconversation/NewConversationViewModelArrangement.kt index f3359c3a3df..6db255c1300 100644 --- a/app/src/test/kotlin/com/wire/android/ui/home/newconversation/NewConversationViewModelArrangement.kt +++ b/app/src/test/kotlin/com/wire/android/ui/home/newconversation/NewConversationViewModelArrangement.kt @@ -160,7 +160,8 @@ internal class NewConversationViewModelArrangement { archived = false, archivedDateTime = null, mlsVerificationStatus = Conversation.VerificationStatus.NOT_VERIFIED, - proteusVerificationStatus = Conversation.VerificationStatus.NOT_VERIFIED + proteusVerificationStatus = Conversation.VerificationStatus.NOT_VERIFIED, + legalHoldStatus = Conversation.LegalHoldStatus.DISABLED ) val PUBLIC_USER = OtherUser( diff --git a/app/src/test/kotlin/com/wire/android/ui/userprofile/other/OtherUserProfileScreenViewModelTest.kt b/app/src/test/kotlin/com/wire/android/ui/userprofile/other/OtherUserProfileScreenViewModelTest.kt index 61aa56606fa..cdae49fc669 100644 --- a/app/src/test/kotlin/com/wire/android/ui/userprofile/other/OtherUserProfileScreenViewModelTest.kt +++ b/app/src/test/kotlin/com/wire/android/ui/userprofile/other/OtherUserProfileScreenViewModelTest.kt @@ -248,7 +248,8 @@ class OtherUserProfileScreenViewModelTest { archived = false, archivedDateTime = null, mlsVerificationStatus = Conversation.VerificationStatus.NOT_VERIFIED, - proteusVerificationStatus = Conversation.VerificationStatus.NOT_VERIFIED + proteusVerificationStatus = Conversation.VerificationStatus.NOT_VERIFIED, + legalHoldStatus = Conversation.LegalHoldStatus.DISABLED ) val CONVERSATION_ROLE_DATA = ConversationRoleData( "some_name", diff --git a/kalium b/kalium index 2c6d0566c19..2ddf5b82add 160000 --- a/kalium +++ b/kalium @@ -1 +1 @@ -Subproject commit 2c6d0566c19213b8f6dc75a4a059cc0369357e6e +Subproject commit 2ddf5b82add97ed9bf32bd642847f2e095f5dbf2