From 9ae029cf5161140b6d28b03d436b9109cdc15d08 Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Fri, 3 Nov 2023 14:06:54 +0100 Subject: [PATCH 01/14] fix: auth, message and others --- .../kotlin/com/wire/android/feature/AccountSwitchUseCase.kt | 2 +- .../migration/feature/MigrateActiveAccountsUseCase.kt | 2 +- .../kotlin/com/wire/android/ui/WireActivityViewModel.kt | 2 +- .../android/ui/authentication/welcome/WelcomeViewModel.kt | 2 +- .../android/ui/settings/devices/DeviceDetailsViewModel.kt | 6 ++++-- kalium | 2 +- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/app/src/main/kotlin/com/wire/android/feature/AccountSwitchUseCase.kt b/app/src/main/kotlin/com/wire/android/feature/AccountSwitchUseCase.kt index b8ab67fa424..4fcbf674c57 100644 --- a/app/src/main/kotlin/com/wire/android/feature/AccountSwitchUseCase.kt +++ b/app/src/main/kotlin/com/wire/android/feature/AccountSwitchUseCase.kt @@ -26,9 +26,9 @@ import com.wire.android.navigation.BackStackMode import com.wire.android.navigation.NavigationCommand import com.wire.android.ui.destinations.HomeScreenDestination import com.wire.android.ui.destinations.WelcomeScreenDestination +import com.wire.kalium.logic.data.auth.AccountInfo import com.wire.kalium.logic.data.logout.LogoutReason import com.wire.kalium.logic.data.user.UserId -import com.wire.kalium.logic.feature.auth.AccountInfo import com.wire.kalium.logic.feature.server.ServerConfigForAccountUseCase import com.wire.kalium.logic.feature.session.CurrentSessionResult import com.wire.kalium.logic.feature.session.CurrentSessionUseCase diff --git a/app/src/main/kotlin/com/wire/android/migration/feature/MigrateActiveAccountsUseCase.kt b/app/src/main/kotlin/com/wire/android/migration/feature/MigrateActiveAccountsUseCase.kt index 1daa69f72e5..e27b5f214d2 100644 --- a/app/src/main/kotlin/com/wire/android/migration/feature/MigrateActiveAccountsUseCase.kt +++ b/app/src/main/kotlin/com/wire/android/migration/feature/MigrateActiveAccountsUseCase.kt @@ -29,9 +29,9 @@ import com.wire.android.migration.userDatabase.ScalaUserDatabaseProvider import com.wire.kalium.logic.CoreFailure import com.wire.kalium.logic.CoreLogic import com.wire.kalium.logic.configuration.server.ServerConfig +import com.wire.kalium.logic.data.auth.AccountTokens import com.wire.kalium.logic.data.user.UserId import com.wire.kalium.logic.feature.auth.AddAuthenticatedUserUseCase -import com.wire.kalium.logic.feature.auth.AccountTokens import com.wire.kalium.logic.feature.auth.sso.SSOLoginSessionResult import com.wire.kalium.logic.functional.Either import com.wire.kalium.logic.functional.flatMap diff --git a/app/src/main/kotlin/com/wire/android/ui/WireActivityViewModel.kt b/app/src/main/kotlin/com/wire/android/ui/WireActivityViewModel.kt index 62700bb2fc7..d2aaf5addc4 100644 --- a/app/src/main/kotlin/com/wire/android/ui/WireActivityViewModel.kt +++ b/app/src/main/kotlin/com/wire/android/ui/WireActivityViewModel.kt @@ -50,13 +50,13 @@ import com.wire.android.util.dispatchers.DispatcherProvider import com.wire.android.util.ui.UIText import com.wire.kalium.logic.CoreLogic import com.wire.kalium.logic.configuration.server.ServerConfig +import com.wire.kalium.logic.data.auth.AccountInfo import com.wire.kalium.logic.data.client.Client import com.wire.kalium.logic.data.id.ConversationId import com.wire.kalium.logic.data.logout.LogoutReason import com.wire.kalium.logic.data.sync.SyncState import com.wire.kalium.logic.data.user.UserId import com.wire.kalium.logic.feature.appVersioning.ObserveIfAppUpdateRequiredUseCase -import com.wire.kalium.logic.feature.auth.AccountInfo import com.wire.kalium.logic.feature.client.ClearNewClientsForUserUseCase import com.wire.kalium.logic.feature.client.NewClientResult import com.wire.kalium.logic.feature.client.ObserveNewClientsUseCase diff --git a/app/src/main/kotlin/com/wire/android/ui/authentication/welcome/WelcomeViewModel.kt b/app/src/main/kotlin/com/wire/android/ui/authentication/welcome/WelcomeViewModel.kt index c24f00dd8d2..d4a35b6b0b9 100644 --- a/app/src/main/kotlin/com/wire/android/ui/authentication/welcome/WelcomeViewModel.kt +++ b/app/src/main/kotlin/com/wire/android/ui/authentication/welcome/WelcomeViewModel.kt @@ -28,7 +28,7 @@ import androidx.lifecycle.viewModelScope import com.wire.android.BuildConfig import com.wire.android.di.AuthServerConfigProvider import com.wire.kalium.logic.configuration.server.ServerConfig -import com.wire.kalium.logic.feature.auth.AccountInfo +import com.wire.kalium.logic.data.auth.AccountInfo import com.wire.kalium.logic.feature.session.GetAllSessionsResult import com.wire.kalium.logic.feature.session.GetSessionsUseCase import dagger.hilt.android.lifecycle.HiltViewModel diff --git a/app/src/main/kotlin/com/wire/android/ui/settings/devices/DeviceDetailsViewModel.kt b/app/src/main/kotlin/com/wire/android/ui/settings/devices/DeviceDetailsViewModel.kt index 645b6be5ddc..843c6973d71 100644 --- a/app/src/main/kotlin/com/wire/android/ui/settings/devices/DeviceDetailsViewModel.kt +++ b/app/src/main/kotlin/com/wire/android/ui/settings/devices/DeviceDetailsViewModel.kt @@ -22,6 +22,7 @@ import com.wire.kalium.logic.feature.client.DeleteClientResult import com.wire.kalium.logic.feature.client.DeleteClientUseCase import com.wire.kalium.logic.feature.client.GetClientDetailsResult import com.wire.kalium.logic.feature.client.ObserveClientDetailsUseCase +import com.wire.kalium.logic.feature.client.Result import com.wire.kalium.logic.feature.client.UpdateClientVerificationStatusUseCase import com.wire.kalium.logic.feature.e2ei.usecase.GetE2EICertificateUseCaseResult import com.wire.kalium.logic.feature.e2ei.usecase.GetE2eiCertificateUseCase @@ -72,6 +73,7 @@ class DeviceDetailsViewModel @Inject constructor( GetUserInfoResult.Failure -> { /* no-op */ } + is GetUserInfoResult.Success -> state = state.copy(userName = result.otherUser.name) } } @@ -100,8 +102,8 @@ class DeviceDetailsViewModel @Inject constructor( private fun getClientFingerPrint() { viewModelScope.launch { state = when (val result = fingerprintUseCase(userId, deviceId)) { - is ClientFingerprintUseCase.Result.Failure -> state.copy(fingerPrint = null) - is ClientFingerprintUseCase.Result.Success -> state.copy(fingerPrint = result.fingerprint.decodeToString()) + is Result.Failure -> state.copy(fingerPrint = null) + is Result.Success -> state.copy(fingerPrint = result.fingerprint.decodeToString()) } } } diff --git a/kalium b/kalium index bfcae0a7340..91ae9e89ace 160000 --- a/kalium +++ b/kalium @@ -1 +1 @@ -Subproject commit bfcae0a73405d6151558a00a031e9cf5abdbff28 +Subproject commit 91ae9e89ace2689ce69bcbf83d19ac6450ad0231 From d511de24df71c3cde04a9c8361f47a337b1492d1 Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Fri, 3 Nov 2023 14:08:31 +0100 Subject: [PATCH 02/14] fix: calling references --- .../com/wire/android/notification/CallNotificationManager.kt | 2 +- app/src/main/kotlin/com/wire/android/ui/calling/CallState.kt | 2 +- .../com/wire/android/ui/calling/SharedCallingViewModel.kt | 4 ++-- .../android/ui/common/topappbar/CommonTopAppBarViewModel.kt | 2 +- .../android/ui/userprofile/self/SelfUserProfileViewModel.kt | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/kotlin/com/wire/android/notification/CallNotificationManager.kt b/app/src/main/kotlin/com/wire/android/notification/CallNotificationManager.kt index 57f57a3dd0d..8fc0700852a 100644 --- a/app/src/main/kotlin/com/wire/android/notification/CallNotificationManager.kt +++ b/app/src/main/kotlin/com/wire/android/notification/CallNotificationManager.kt @@ -27,10 +27,10 @@ import androidx.core.app.NotificationManagerCompat import com.wire.android.R import com.wire.android.appLogger import com.wire.android.util.dispatchers.DispatcherProvider +import com.wire.kalium.logic.data.call.Call import com.wire.kalium.logic.data.conversation.Conversation import com.wire.kalium.logic.data.id.QualifiedID import com.wire.kalium.logic.data.user.UserId -import com.wire.kalium.logic.feature.call.Call import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.SupervisorJob import kotlinx.coroutines.flow.MutableStateFlow diff --git a/app/src/main/kotlin/com/wire/android/ui/calling/CallState.kt b/app/src/main/kotlin/com/wire/android/ui/calling/CallState.kt index 6acf6b391c4..5ba6ace3402 100644 --- a/app/src/main/kotlin/com/wire/android/ui/calling/CallState.kt +++ b/app/src/main/kotlin/com/wire/android/ui/calling/CallState.kt @@ -23,9 +23,9 @@ package com.wire.android.ui.calling import com.wire.android.model.ImageAsset.UserAvatarAsset import com.wire.android.ui.calling.model.UICallParticipant import com.wire.android.ui.home.conversationslist.model.Membership +import com.wire.kalium.logic.data.call.CallStatus import com.wire.kalium.logic.data.call.ConversationType import com.wire.kalium.logic.data.id.ConversationId -import com.wire.kalium.logic.feature.call.CallStatus data class CallState( val conversationId: ConversationId, diff --git a/app/src/main/kotlin/com/wire/android/ui/calling/SharedCallingViewModel.kt b/app/src/main/kotlin/com/wire/android/ui/calling/SharedCallingViewModel.kt index f1920bec253..032a7004443 100644 --- a/app/src/main/kotlin/com/wire/android/ui/calling/SharedCallingViewModel.kt +++ b/app/src/main/kotlin/com/wire/android/ui/calling/SharedCallingViewModel.kt @@ -37,13 +37,13 @@ import com.wire.android.util.CurrentScreen import com.wire.android.util.CurrentScreenManager import com.wire.android.util.dispatchers.DispatcherProvider import com.wire.android.util.ui.WireSessionImageLoader +import com.wire.kalium.logic.data.call.Call +import com.wire.kalium.logic.data.call.CallStatus import com.wire.kalium.logic.data.call.ConversationType import com.wire.kalium.logic.data.call.VideoState import com.wire.kalium.logic.data.conversation.Conversation import com.wire.kalium.logic.data.conversation.ConversationDetails import com.wire.kalium.logic.data.id.QualifiedID -import com.wire.kalium.logic.feature.call.Call -import com.wire.kalium.logic.feature.call.CallStatus import com.wire.kalium.logic.feature.call.usecase.EndCallUseCase import com.wire.kalium.logic.feature.call.usecase.FlipToBackCameraUseCase import com.wire.kalium.logic.feature.call.usecase.FlipToFrontCameraUseCase 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 0409800a404..256c4d16721 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 @@ -29,9 +29,9 @@ import com.wire.android.di.KaliumCoreLogic 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.sync.SyncState import com.wire.kalium.logic.data.user.UserId -import com.wire.kalium.logic.feature.call.Call import com.wire.kalium.logic.feature.session.CurrentSessionResult import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.ExperimentalCoroutinesApi diff --git a/app/src/main/kotlin/com/wire/android/ui/userprofile/self/SelfUserProfileViewModel.kt b/app/src/main/kotlin/com/wire/android/ui/userprofile/self/SelfUserProfileViewModel.kt index 5df06246774..8eba4d42aae 100644 --- a/app/src/main/kotlin/com/wire/android/ui/userprofile/self/SelfUserProfileViewModel.kt +++ b/app/src/main/kotlin/com/wire/android/ui/userprofile/self/SelfUserProfileViewModel.kt @@ -43,6 +43,7 @@ import com.wire.android.ui.userprofile.self.dialog.StatusDialogData import com.wire.android.util.dispatchers.DispatcherProvider import com.wire.android.util.ui.WireSessionImageLoader import com.wire.kalium.logic.configuration.server.ServerConfig +import com.wire.kalium.logic.data.call.Call import com.wire.kalium.logic.data.logout.LogoutReason import com.wire.kalium.logic.data.team.Team import com.wire.kalium.logic.data.user.SelfUser @@ -50,7 +51,6 @@ import com.wire.kalium.logic.data.user.UserAssetId import com.wire.kalium.logic.data.user.UserAvailabilityStatus import com.wire.kalium.logic.data.user.UserId import com.wire.kalium.logic.feature.auth.LogoutUseCase -import com.wire.kalium.logic.feature.call.Call import com.wire.kalium.logic.feature.call.usecase.EndCallUseCase import com.wire.kalium.logic.feature.call.usecase.ObserveEstablishedCallsUseCase import com.wire.kalium.logic.feature.team.GetSelfTeamUseCase From 2af3cc9b31acef06b6f523dc6a5073588e2f2b5e Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Fri, 3 Nov 2023 15:29:25 +0100 Subject: [PATCH 03/14] fix: messages and conversation references with internal usecases --- .../wire/android/ui/home/conversations/ConversationScreen.kt | 2 +- .../android/ui/home/conversations/MessageComposerViewModel.kt | 2 +- .../android/ui/home/conversations/MessageComposerViewState.kt | 2 +- .../details/options/GroupConversationOptionsState.kt | 2 +- .../wire/android/ui/home/messagecomposer/MessageActions.kt | 2 +- .../wire/android/ui/home/messagecomposer/MessageComposer.kt | 2 +- .../home/messagecomposer/state/MessageComposerStateHolder.kt | 2 +- .../state/MessageCompositionInputStateHolder.kt | 2 +- .../newconversation/common/SelectParticipantsButtonsRow.kt | 2 +- .../android/ui/home/sync/FeatureFlagNotificationViewModel.kt | 2 +- .../android/ui/sharing/ImportMediaAuthenticatedViewModel.kt | 4 ++-- kalium | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/src/main/kotlin/com/wire/android/ui/home/conversations/ConversationScreen.kt b/app/src/main/kotlin/com/wire/android/ui/home/conversations/ConversationScreen.kt index 8bcfc46640b..cc58d23fcda 100644 --- a/app/src/main/kotlin/com/wire/android/ui/home/conversations/ConversationScreen.kt +++ b/app/src/main/kotlin/com/wire/android/ui/home/conversations/ConversationScreen.kt @@ -135,10 +135,10 @@ import com.wire.kalium.logic.NetworkFailure import com.wire.kalium.logic.data.conversation.Conversation import com.wire.kalium.logic.data.conversation.Conversation.TypingIndicatorMode import com.wire.kalium.logic.data.id.ConversationId +import com.wire.kalium.logic.data.message.SelfDeletionTimer import com.wire.kalium.logic.data.user.UserId import com.wire.kalium.logic.feature.call.usecase.ConferenceCallingResult import com.wire.kalium.logic.feature.conversation.InteractionAvailability -import com.wire.kalium.logic.feature.selfDeletingMessages.SelfDeletionTimer import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.delay import kotlinx.coroutines.flow.Flow diff --git a/app/src/main/kotlin/com/wire/android/ui/home/conversations/MessageComposerViewModel.kt b/app/src/main/kotlin/com/wire/android/ui/home/conversations/MessageComposerViewModel.kt index 4eedc3d938e..75c56cbb748 100644 --- a/app/src/main/kotlin/com/wire/android/ui/home/conversations/MessageComposerViewModel.kt +++ b/app/src/main/kotlin/com/wire/android/ui/home/conversations/MessageComposerViewModel.kt @@ -52,6 +52,7 @@ import com.wire.kalium.logic.data.asset.AttachmentType import com.wire.kalium.logic.data.asset.KaliumFileSystem import com.wire.kalium.logic.data.conversation.Conversation.TypingIndicatorMode import com.wire.kalium.logic.data.id.QualifiedID +import com.wire.kalium.logic.data.message.SelfDeletionTimer import com.wire.kalium.logic.data.user.OtherUser import com.wire.kalium.logic.feature.asset.GetAssetSizeLimitUseCase import com.wire.kalium.logic.feature.asset.ScheduleNewAssetMessageUseCase @@ -69,7 +70,6 @@ import com.wire.kalium.logic.feature.message.SendTextMessageUseCase import com.wire.kalium.logic.feature.message.ephemeral.EnqueueMessageSelfDeletionUseCase import com.wire.kalium.logic.feature.selfDeletingMessages.ObserveSelfDeletionTimerSettingsForConversationUseCase import com.wire.kalium.logic.feature.selfDeletingMessages.PersistNewSelfDeletionTimerUseCase -import com.wire.kalium.logic.feature.selfDeletingMessages.SelfDeletionTimer import com.wire.kalium.logic.feature.user.IsFileSharingEnabledUseCase import com.wire.kalium.logic.functional.onFailure import dagger.hilt.android.lifecycle.HiltViewModel diff --git a/app/src/main/kotlin/com/wire/android/ui/home/conversations/MessageComposerViewState.kt b/app/src/main/kotlin/com/wire/android/ui/home/conversations/MessageComposerViewState.kt index a9f13d557db..e0565dbc81a 100644 --- a/app/src/main/kotlin/com/wire/android/ui/home/conversations/MessageComposerViewState.kt +++ b/app/src/main/kotlin/com/wire/android/ui/home/conversations/MessageComposerViewState.kt @@ -22,8 +22,8 @@ package com.wire.android.ui.home.conversations import com.wire.android.ui.home.newconversation.model.Contact import com.wire.kalium.logic.data.asset.AttachmentType +import com.wire.kalium.logic.data.message.SelfDeletionTimer import com.wire.kalium.logic.feature.conversation.InteractionAvailability -import com.wire.kalium.logic.feature.selfDeletingMessages.SelfDeletionTimer import kotlin.time.Duration.Companion.ZERO data class MessageComposerViewState( diff --git a/app/src/main/kotlin/com/wire/android/ui/home/conversations/details/options/GroupConversationOptionsState.kt b/app/src/main/kotlin/com/wire/android/ui/home/conversations/details/options/GroupConversationOptionsState.kt index d42b34c0624..eb77ffbdb95 100644 --- a/app/src/main/kotlin/com/wire/android/ui/home/conversations/details/options/GroupConversationOptionsState.kt +++ b/app/src/main/kotlin/com/wire/android/ui/home/conversations/details/options/GroupConversationOptionsState.kt @@ -23,7 +23,7 @@ package com.wire.android.ui.home.conversations.details.options import com.wire.kalium.logic.CoreFailure import com.wire.kalium.logic.data.conversation.Conversation import com.wire.kalium.logic.data.id.ConversationId -import com.wire.kalium.logic.feature.selfDeletingMessages.SelfDeletionTimer +import com.wire.kalium.logic.data.message.SelfDeletionTimer data class GroupConversationOptionsState( val conversationId: ConversationId, diff --git a/app/src/main/kotlin/com/wire/android/ui/home/messagecomposer/MessageActions.kt b/app/src/main/kotlin/com/wire/android/ui/home/messagecomposer/MessageActions.kt index 03c000b712d..69651b1a450 100644 --- a/app/src/main/kotlin/com/wire/android/ui/home/messagecomposer/MessageActions.kt +++ b/app/src/main/kotlin/com/wire/android/ui/home/messagecomposer/MessageActions.kt @@ -47,7 +47,7 @@ import com.wire.android.ui.common.typography import com.wire.android.ui.home.conversations.selfdeletion.SelfDeletionMapper.toSelfDeletionDuration import com.wire.android.ui.theme.wireDimensions import com.wire.android.util.ui.PreviewMultipleThemes -import com.wire.kalium.logic.feature.selfDeletingMessages.SelfDeletionTimer +import com.wire.kalium.logic.data.message.SelfDeletionTimer @Composable fun MessageSendActions( diff --git a/app/src/main/kotlin/com/wire/android/ui/home/messagecomposer/MessageComposer.kt b/app/src/main/kotlin/com/wire/android/ui/home/messagecomposer/MessageComposer.kt index 71603d19c5d..9aa59941236 100644 --- a/app/src/main/kotlin/com/wire/android/ui/home/messagecomposer/MessageComposer.kt +++ b/app/src/main/kotlin/com/wire/android/ui/home/messagecomposer/MessageComposer.kt @@ -65,8 +65,8 @@ import com.wire.android.ui.theme.wireTypography import com.wire.android.util.ui.stringWithStyledArgs import com.wire.kalium.logic.data.conversation.Conversation.TypingIndicatorMode import com.wire.kalium.logic.data.id.ConversationId +import com.wire.kalium.logic.data.message.SelfDeletionTimer import com.wire.kalium.logic.feature.conversation.InteractionAvailability -import com.wire.kalium.logic.feature.selfDeletingMessages.SelfDeletionTimer import kotlin.time.Duration @Composable diff --git a/app/src/main/kotlin/com/wire/android/ui/home/messagecomposer/state/MessageComposerStateHolder.kt b/app/src/main/kotlin/com/wire/android/ui/home/messagecomposer/state/MessageComposerStateHolder.kt index 8b9eec4ebde..59153eed910 100644 --- a/app/src/main/kotlin/com/wire/android/ui/home/messagecomposer/state/MessageComposerStateHolder.kt +++ b/app/src/main/kotlin/com/wire/android/ui/home/messagecomposer/state/MessageComposerStateHolder.kt @@ -30,8 +30,8 @@ import androidx.compose.ui.platform.LocalDensity import com.wire.android.ui.common.bottomsheet.WireModalSheetState import com.wire.android.ui.home.conversations.MessageComposerViewState import com.wire.android.ui.home.conversations.model.UIMessage +import com.wire.kalium.logic.data.message.SelfDeletionTimer import com.wire.kalium.logic.data.message.mention.MessageMention -import com.wire.kalium.logic.feature.selfDeletingMessages.SelfDeletionTimer @Suppress("LongParameterList") @Composable diff --git a/app/src/main/kotlin/com/wire/android/ui/home/messagecomposer/state/MessageCompositionInputStateHolder.kt b/app/src/main/kotlin/com/wire/android/ui/home/messagecomposer/state/MessageCompositionInputStateHolder.kt index 91a2afe3bf3..6c702fcb423 100644 --- a/app/src/main/kotlin/com/wire/android/ui/home/messagecomposer/state/MessageCompositionInputStateHolder.kt +++ b/app/src/main/kotlin/com/wire/android/ui/home/messagecomposer/state/MessageCompositionInputStateHolder.kt @@ -38,7 +38,7 @@ import com.wire.android.ui.common.colorsScheme import com.wire.android.ui.common.textfield.WireTextFieldColors import com.wire.android.ui.common.textfield.wireTextFieldColors import com.wire.android.util.ui.KeyboardHeight -import com.wire.kalium.logic.feature.selfDeletingMessages.SelfDeletionTimer +import com.wire.kalium.logic.data.message.SelfDeletionTimer import com.wire.kalium.logic.util.isPositiveNotNull @Stable diff --git a/app/src/main/kotlin/com/wire/android/ui/home/newconversation/common/SelectParticipantsButtonsRow.kt b/app/src/main/kotlin/com/wire/android/ui/home/newconversation/common/SelectParticipantsButtonsRow.kt index d3877508bf8..0c88e410da0 100644 --- a/app/src/main/kotlin/com/wire/android/ui/home/newconversation/common/SelectParticipantsButtonsRow.kt +++ b/app/src/main/kotlin/com/wire/android/ui/home/newconversation/common/SelectParticipantsButtonsRow.kt @@ -54,7 +54,7 @@ import com.wire.android.ui.theme.WireTheme import com.wire.android.ui.theme.wireColorScheme import com.wire.android.ui.theme.wireDimensions import com.wire.android.util.ui.PreviewMultipleThemes -import com.wire.kalium.logic.feature.selfDeletingMessages.SelfDeletionTimer +import com.wire.kalium.logic.data.message.SelfDeletionTimer import kotlin.time.Duration.Companion.ZERO import kotlin.time.DurationUnit import kotlin.time.toDuration diff --git a/app/src/main/kotlin/com/wire/android/ui/home/sync/FeatureFlagNotificationViewModel.kt b/app/src/main/kotlin/com/wire/android/ui/home/sync/FeatureFlagNotificationViewModel.kt index 472cf020854..104ab3e35ff 100644 --- a/app/src/main/kotlin/com/wire/android/ui/home/sync/FeatureFlagNotificationViewModel.kt +++ b/app/src/main/kotlin/com/wire/android/ui/home/sync/FeatureFlagNotificationViewModel.kt @@ -32,9 +32,9 @@ import com.wire.android.ui.home.conversations.selfdeletion.SelfDeletionMapper.to import com.wire.android.ui.home.messagecomposer.SelfDeletionDuration import com.wire.kalium.logic.CoreLogic import com.wire.kalium.logic.configuration.FileSharingStatus +import com.wire.kalium.logic.data.message.TeamSelfDeleteTimer import com.wire.kalium.logic.data.sync.SyncState import com.wire.kalium.logic.data.user.UserId -import com.wire.kalium.logic.feature.selfDeletingMessages.TeamSelfDeleteTimer import com.wire.kalium.logic.feature.session.CurrentSessionResult import com.wire.kalium.logic.feature.session.CurrentSessionUseCase import com.wire.kalium.logic.feature.user.E2EIRequiredResult diff --git a/app/src/main/kotlin/com/wire/android/ui/sharing/ImportMediaAuthenticatedViewModel.kt b/app/src/main/kotlin/com/wire/android/ui/sharing/ImportMediaAuthenticatedViewModel.kt index 249d644cede..1c8ec550dd3 100644 --- a/app/src/main/kotlin/com/wire/android/ui/sharing/ImportMediaAuthenticatedViewModel.kt +++ b/app/src/main/kotlin/com/wire/android/ui/sharing/ImportMediaAuthenticatedViewModel.kt @@ -41,6 +41,8 @@ import com.wire.android.util.ui.WireSessionImageLoader import com.wire.kalium.logic.data.asset.KaliumFileSystem import com.wire.kalium.logic.data.conversation.ConversationDetails import com.wire.kalium.logic.data.id.ConversationId +import com.wire.kalium.logic.data.message.SelfDeletionTimer +import com.wire.kalium.logic.data.message.SelfDeletionTimer.Companion.SELF_DELETION_LOG_TAG import com.wire.kalium.logic.feature.asset.GetAssetSizeLimitUseCase import com.wire.kalium.logic.feature.asset.ScheduleNewAssetMessageResult import com.wire.kalium.logic.feature.asset.ScheduleNewAssetMessageUseCase @@ -48,8 +50,6 @@ import com.wire.kalium.logic.feature.conversation.ObserveConversationListDetails import com.wire.kalium.logic.feature.message.SendTextMessageUseCase import com.wire.kalium.logic.feature.selfDeletingMessages.ObserveSelfDeletionTimerSettingsForConversationUseCase import com.wire.kalium.logic.feature.selfDeletingMessages.PersistNewSelfDeletionTimerUseCase -import com.wire.kalium.logic.feature.selfDeletingMessages.SelfDeletionTimer -import com.wire.kalium.logic.feature.selfDeletingMessages.SelfDeletionTimer.Companion.SELF_DELETION_LOG_TAG import com.wire.kalium.logic.feature.user.GetSelfUserUseCase import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.ExperimentalCoroutinesApi diff --git a/kalium b/kalium index 91ae9e89ace..e13aea2b95b 160000 --- a/kalium +++ b/kalium @@ -1 +1 @@ -Subproject commit 91ae9e89ace2689ce69bcbf83d19ac6450ad0231 +Subproject commit e13aea2b95b025d381df18ad48c3ec4af6206a17 From 74b7579e1d01ef9f9d00795a851814f15c15c64d Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Fri, 3 Nov 2023 16:24:44 +0100 Subject: [PATCH 04/14] fix: messages and conversation references with internal usecases --- kalium | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kalium b/kalium index e13aea2b95b..1b0486ca7d8 160000 --- a/kalium +++ b/kalium @@ -1 +1 @@ -Subproject commit e13aea2b95b025d381df18ad48c3ec4af6206a17 +Subproject commit 1b0486ca7d875d3a25aa2c561efbd38d530aaf20 From 335b10ab9dfe5307ef60cbb2d168994de60f3d3f Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Tue, 7 Nov 2023 08:50:32 +0100 Subject: [PATCH 05/14] fix: kalium ref --- kalium | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kalium b/kalium index 1b0486ca7d8..b182276f894 160000 --- a/kalium +++ b/kalium @@ -1 +1 @@ -Subproject commit 1b0486ca7d875d3a25aa2c561efbd38d530aaf20 +Subproject commit b182276f89403efe2568439df71697a4b5317529 From 9c2604c79376a47173975d1c35784e2d94463431 Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Tue, 7 Nov 2023 09:25:25 +0100 Subject: [PATCH 06/14] fix: dependency resolution --- kalium | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kalium b/kalium index b182276f894..5592408f11c 160000 --- a/kalium +++ b/kalium @@ -1 +1 @@ -Subproject commit b182276f89403efe2568439df71697a4b5317529 +Subproject commit 5592408f11cf0e3683b4a563c3b4e9ac0b07424d From c61871a396affdfc51ff527bf3e9bdfd971e1cc1 Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Tue, 7 Nov 2023 10:46:17 +0100 Subject: [PATCH 07/14] fix: dependency resolution --- kalium | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kalium b/kalium index 5592408f11c..f74b012e7db 160000 --- a/kalium +++ b/kalium @@ -1 +1 @@ -Subproject commit 5592408f11cf0e3683b4a563c3b4e9ac0b07424d +Subproject commit f74b012e7db3f438d90e678e67f1764ace5c57a7 From acedacca55f6715dc60a2cad513cf2dacd33d424 Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Tue, 7 Nov 2023 10:55:43 +0100 Subject: [PATCH 08/14] fix: dependency resolution --- .../android/ui/home/appLock/forgot/ForgotLockScreenViewModel.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/wire/android/ui/home/appLock/forgot/ForgotLockScreenViewModel.kt b/app/src/main/kotlin/com/wire/android/ui/home/appLock/forgot/ForgotLockScreenViewModel.kt index 5084dd55fa6..460646dc76d 100644 --- a/app/src/main/kotlin/com/wire/android/ui/home/appLock/forgot/ForgotLockScreenViewModel.kt +++ b/app/src/main/kotlin/com/wire/android/ui/home/appLock/forgot/ForgotLockScreenViewModel.kt @@ -34,10 +34,10 @@ import com.wire.android.notification.NotificationChannelsManager import com.wire.android.notification.WireNotificationManager import com.wire.kalium.logic.CoreFailure import com.wire.kalium.logic.CoreLogic +import com.wire.kalium.logic.data.auth.AccountInfo import com.wire.kalium.logic.data.client.DeleteClientParam import com.wire.kalium.logic.data.logout.LogoutReason import com.wire.kalium.logic.data.user.UserId -import com.wire.kalium.logic.feature.auth.AccountInfo import com.wire.kalium.logic.feature.auth.ValidatePasswordUseCase import com.wire.kalium.logic.feature.call.usecase.EndCallUseCase import com.wire.kalium.logic.feature.call.usecase.ObserveEstablishedCallsUseCase From c448ec184609edf96e4e1ee8d4b214c99214a4dc Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Tue, 7 Nov 2023 11:04:39 +0100 Subject: [PATCH 09/14] fix: dependency resolution --- .../wire/android/util/lifecycle/ConnectionPolicyManagerTest.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/test/kotlin/com/wire/android/util/lifecycle/ConnectionPolicyManagerTest.kt b/app/src/test/kotlin/com/wire/android/util/lifecycle/ConnectionPolicyManagerTest.kt index 60559ebb938..d9daa5ddd19 100644 --- a/app/src/test/kotlin/com/wire/android/util/lifecycle/ConnectionPolicyManagerTest.kt +++ b/app/src/test/kotlin/com/wire/android/util/lifecycle/ConnectionPolicyManagerTest.kt @@ -24,11 +24,11 @@ import com.wire.android.config.TestDispatcherProvider import com.wire.android.migration.MigrationManager import com.wire.android.util.CurrentScreenManager import com.wire.kalium.logic.CoreLogic +import com.wire.kalium.logic.data.auth.AccountInfo import com.wire.kalium.logic.data.session.SessionRepository import com.wire.kalium.logic.data.sync.ConnectionPolicy import com.wire.kalium.logic.data.user.UserId import com.wire.kalium.logic.feature.UserSessionScope -import com.wire.kalium.logic.feature.auth.AccountInfo import com.wire.kalium.logic.functional.Either import com.wire.kalium.logic.sync.SetConnectionPolicyUseCase import com.wire.kalium.logic.sync.SyncManager From 0f70010e3dcfb00cefb8d5956b7cda7732a6b91c Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Tue, 7 Nov 2023 11:30:08 +0100 Subject: [PATCH 10/14] fix: test references --- .../kotlin/com/wire/android/GlobalObserversManagerTest.kt | 2 +- .../com/wire/android/feature/AccountSwitchUseCaseTest.kt | 2 +- .../wire/android/feature/ObserveAppLockConfigUseCaseTest.kt | 2 +- .../android/notification/CallNotificationManagerTest.kt | 4 ++-- .../android/notification/WireNotificationManagerTest.kt | 6 +++--- .../authentication/login/email/LoginEmailViewModelTest.kt | 2 +- .../ui/authentication/login/sso/LoginSSOViewModelTest.kt | 2 +- .../com/wire/android/ui/calling/OngoingCallViewModelTest.kt | 4 ++-- .../ui/calling/incoming/IncomingCallViewModelTest.kt | 4 ++-- .../ui/common/topappbar/CommonTopAppBarViewModelTest.kt | 4 ++-- .../ui/home/appLock/forgot/ForgotLockScreenViewModelTest.kt | 4 ++-- .../conversations/MessageComposerViewModelArrangement.kt | 2 +- .../ui/home/conversations/MessageComposerViewModelTest.kt | 2 +- .../details/GroupConversationDetailsViewModelTest.kt | 2 +- .../EditSelfDeletingMessagesViewModelTest.kt | 2 +- .../messagecomposer/recordaudio/RecordAudioViewModelTest.kt | 4 ++-- .../ui/home/sync/FeatureFlagNotificationViewModelTest.kt | 2 +- .../ui/settings/devices/DeviceDetailsViewModelTest.kt | 5 +++-- .../kotlin/com/wire/android/util/DeepLinkProcessorTest.kt | 2 +- 19 files changed, 29 insertions(+), 28 deletions(-) diff --git a/app/src/test/kotlin/com/wire/android/GlobalObserversManagerTest.kt b/app/src/test/kotlin/com/wire/android/GlobalObserversManagerTest.kt index 8dccc04c1bb..0a0d284ec99 100644 --- a/app/src/test/kotlin/com/wire/android/GlobalObserversManagerTest.kt +++ b/app/src/test/kotlin/com/wire/android/GlobalObserversManagerTest.kt @@ -7,9 +7,9 @@ import com.wire.android.framework.TestUser import com.wire.android.notification.NotificationChannelsManager import com.wire.android.notification.WireNotificationManager import com.wire.kalium.logic.CoreLogic +import com.wire.kalium.logic.data.auth.PersistentWebSocketStatus import com.wire.kalium.logic.data.team.Team import com.wire.kalium.logic.data.user.SelfUser -import com.wire.kalium.logic.feature.auth.PersistentWebSocketStatus import com.wire.kalium.logic.feature.user.webSocketStatus.ObservePersistentWebSocketConnectionStatusUseCase import io.mockk.MockKAnnotations import io.mockk.coEvery diff --git a/app/src/test/kotlin/com/wire/android/feature/AccountSwitchUseCaseTest.kt b/app/src/test/kotlin/com/wire/android/feature/AccountSwitchUseCaseTest.kt index d69720caf82..006d455fedc 100644 --- a/app/src/test/kotlin/com/wire/android/feature/AccountSwitchUseCaseTest.kt +++ b/app/src/test/kotlin/com/wire/android/feature/AccountSwitchUseCaseTest.kt @@ -22,9 +22,9 @@ package com.wire.android.feature import com.wire.android.di.AuthServerConfigProvider import com.wire.android.util.newServerConfig +import com.wire.kalium.logic.data.auth.AccountInfo import com.wire.kalium.logic.data.logout.LogoutReason import com.wire.kalium.logic.data.user.UserId -import com.wire.kalium.logic.feature.auth.AccountInfo import com.wire.kalium.logic.feature.server.ServerConfigForAccountUseCase import com.wire.kalium.logic.feature.session.CurrentSessionResult import com.wire.kalium.logic.feature.session.CurrentSessionUseCase diff --git a/app/src/test/kotlin/com/wire/android/feature/ObserveAppLockConfigUseCaseTest.kt b/app/src/test/kotlin/com/wire/android/feature/ObserveAppLockConfigUseCaseTest.kt index a436d4d6c40..cdd48024f52 100644 --- a/app/src/test/kotlin/com/wire/android/feature/ObserveAppLockConfigUseCaseTest.kt +++ b/app/src/test/kotlin/com/wire/android/feature/ObserveAppLockConfigUseCaseTest.kt @@ -20,11 +20,11 @@ package com.wire.android.feature import app.cash.turbine.test import com.wire.android.datastore.GlobalDataStore import com.wire.kalium.logic.CoreLogic +import com.wire.kalium.logic.data.auth.AccountInfo import com.wire.kalium.logic.data.user.UserId import com.wire.kalium.logic.feature.UserSessionScope import com.wire.kalium.logic.feature.applock.AppLockTeamConfig import com.wire.kalium.logic.feature.applock.AppLockTeamFeatureConfigObserver -import com.wire.kalium.logic.feature.auth.AccountInfo import com.wire.kalium.logic.feature.session.CurrentSessionResult import com.wire.kalium.logic.feature.session.CurrentSessionUseCase import io.mockk.MockKAnnotations diff --git a/app/src/test/kotlin/com/wire/android/notification/CallNotificationManagerTest.kt b/app/src/test/kotlin/com/wire/android/notification/CallNotificationManagerTest.kt index dd118b5f5bc..054f33a0593 100644 --- a/app/src/test/kotlin/com/wire/android/notification/CallNotificationManagerTest.kt +++ b/app/src/test/kotlin/com/wire/android/notification/CallNotificationManagerTest.kt @@ -22,11 +22,11 @@ import android.content.Context import androidx.core.app.NotificationManagerCompat import com.wire.android.config.TestDispatcherProvider import com.wire.android.notification.CallNotificationManager.Companion.DEBOUNCE_TIME +import com.wire.kalium.logic.data.call.Call +import com.wire.kalium.logic.data.call.CallStatus import com.wire.kalium.logic.data.conversation.Conversation import com.wire.kalium.logic.data.id.ConversationId import com.wire.kalium.logic.data.user.UserId -import com.wire.kalium.logic.feature.call.Call -import com.wire.kalium.logic.feature.call.CallStatus import io.mockk.MockKAnnotations import io.mockk.clearMocks import io.mockk.every diff --git a/app/src/test/kotlin/com/wire/android/notification/WireNotificationManagerTest.kt b/app/src/test/kotlin/com/wire/android/notification/WireNotificationManagerTest.kt index 593b5cfdfce..04b3ea410fd 100644 --- a/app/src/test/kotlin/com/wire/android/notification/WireNotificationManagerTest.kt +++ b/app/src/test/kotlin/com/wire/android/notification/WireNotificationManagerTest.kt @@ -32,6 +32,9 @@ import com.wire.android.util.newServerConfig import com.wire.kalium.logic.CoreLogic import com.wire.kalium.logic.GlobalKaliumScope import com.wire.kalium.logic.configuration.server.ServerConfig +import com.wire.kalium.logic.data.auth.AccountInfo +import com.wire.kalium.logic.data.call.Call +import com.wire.kalium.logic.data.call.CallStatus import com.wire.kalium.logic.data.conversation.Conversation import com.wire.kalium.logic.data.id.ConversationId import com.wire.kalium.logic.data.logout.LogoutReason @@ -43,9 +46,6 @@ import com.wire.kalium.logic.data.user.SelfUser import com.wire.kalium.logic.data.user.UserAvailabilityStatus import com.wire.kalium.logic.data.user.UserId import com.wire.kalium.logic.feature.UserSessionScope -import com.wire.kalium.logic.feature.auth.AccountInfo -import com.wire.kalium.logic.feature.call.Call -import com.wire.kalium.logic.feature.call.CallStatus import com.wire.kalium.logic.feature.call.CallsScope import com.wire.kalium.logic.feature.call.usecase.GetIncomingCallsUseCase import com.wire.kalium.logic.feature.call.usecase.ObserveEstablishedCallsUseCase diff --git a/app/src/test/kotlin/com/wire/android/ui/authentication/login/email/LoginEmailViewModelTest.kt b/app/src/test/kotlin/com/wire/android/ui/authentication/login/email/LoginEmailViewModelTest.kt index ace7b3f4a4f..08a66af06cf 100644 --- a/app/src/test/kotlin/com/wire/android/ui/authentication/login/email/LoginEmailViewModelTest.kt +++ b/app/src/test/kotlin/com/wire/android/ui/authentication/login/email/LoginEmailViewModelTest.kt @@ -40,13 +40,13 @@ import com.wire.kalium.logic.CoreLogic import com.wire.kalium.logic.NetworkFailure import com.wire.kalium.logic.configuration.server.CommonApiVersionType import com.wire.kalium.logic.configuration.server.ServerConfig +import com.wire.kalium.logic.data.auth.AccountTokens import com.wire.kalium.logic.data.auth.verification.VerifiableAction import com.wire.kalium.logic.data.id.QualifiedID import com.wire.kalium.logic.data.id.QualifiedIdMapper import com.wire.kalium.logic.data.user.SsoId import com.wire.kalium.logic.data.user.UserId import com.wire.kalium.logic.feature.auth.AddAuthenticatedUserUseCase -import com.wire.kalium.logic.feature.auth.AccountTokens import com.wire.kalium.logic.feature.auth.AuthenticationResult import com.wire.kalium.logic.feature.auth.AuthenticationScope import com.wire.kalium.logic.feature.auth.LoginUseCase diff --git a/app/src/test/kotlin/com/wire/android/ui/authentication/login/sso/LoginSSOViewModelTest.kt b/app/src/test/kotlin/com/wire/android/ui/authentication/login/sso/LoginSSOViewModelTest.kt index d1231264b38..9986ae4634f 100644 --- a/app/src/test/kotlin/com/wire/android/ui/authentication/login/sso/LoginSSOViewModelTest.kt +++ b/app/src/test/kotlin/com/wire/android/ui/authentication/login/sso/LoginSSOViewModelTest.kt @@ -39,11 +39,11 @@ import com.wire.kalium.logic.CoreLogic import com.wire.kalium.logic.NetworkFailure import com.wire.kalium.logic.configuration.server.CommonApiVersionType import com.wire.kalium.logic.configuration.server.ServerConfig +import com.wire.kalium.logic.data.auth.AccountTokens import com.wire.kalium.logic.data.id.QualifiedID import com.wire.kalium.logic.data.user.SsoId import com.wire.kalium.logic.data.user.UserId import com.wire.kalium.logic.feature.auth.AddAuthenticatedUserUseCase -import com.wire.kalium.logic.feature.auth.AccountTokens import com.wire.kalium.logic.feature.auth.AuthenticationScope import com.wire.kalium.logic.feature.auth.DomainLookupUseCase import com.wire.kalium.logic.feature.auth.ValidateEmailUseCase diff --git a/app/src/test/kotlin/com/wire/android/ui/calling/OngoingCallViewModelTest.kt b/app/src/test/kotlin/com/wire/android/ui/calling/OngoingCallViewModelTest.kt index 9a01dd75145..a28668a90cf 100644 --- a/app/src/test/kotlin/com/wire/android/ui/calling/OngoingCallViewModelTest.kt +++ b/app/src/test/kotlin/com/wire/android/ui/calling/OngoingCallViewModelTest.kt @@ -30,12 +30,12 @@ import com.wire.android.ui.home.conversationslist.model.Membership import com.wire.android.ui.navArgs import com.wire.android.util.CurrentScreen import com.wire.android.util.CurrentScreenManager +import com.wire.kalium.logic.data.call.Call import com.wire.kalium.logic.data.call.CallClient +import com.wire.kalium.logic.data.call.CallStatus import com.wire.kalium.logic.data.conversation.Conversation import com.wire.kalium.logic.data.id.ConversationId import com.wire.kalium.logic.data.id.QualifiedID -import com.wire.kalium.logic.feature.call.Call -import com.wire.kalium.logic.feature.call.CallStatus import com.wire.kalium.logic.data.user.UserId import com.wire.kalium.logic.feature.call.usecase.ObserveEstablishedCallsUseCase import com.wire.kalium.logic.feature.call.usecase.RequestVideoStreamsUseCase diff --git a/app/src/test/kotlin/com/wire/android/ui/calling/incoming/IncomingCallViewModelTest.kt b/app/src/test/kotlin/com/wire/android/ui/calling/incoming/IncomingCallViewModelTest.kt index 4888059073d..b5ec9021e5f 100644 --- a/app/src/test/kotlin/com/wire/android/ui/calling/incoming/IncomingCallViewModelTest.kt +++ b/app/src/test/kotlin/com/wire/android/ui/calling/incoming/IncomingCallViewModelTest.kt @@ -26,10 +26,10 @@ import com.wire.android.config.NavigationTestExtension import com.wire.android.media.CallRinger import com.wire.android.ui.calling.CallingNavArgs import com.wire.android.ui.navArgs +import com.wire.kalium.logic.data.call.Call +import com.wire.kalium.logic.data.call.CallStatus import com.wire.kalium.logic.data.conversation.Conversation import com.wire.kalium.logic.data.id.ConversationId -import com.wire.kalium.logic.feature.call.Call -import com.wire.kalium.logic.feature.call.CallStatus import com.wire.kalium.logic.feature.call.usecase.AnswerCallUseCase import com.wire.kalium.logic.feature.call.usecase.EndCallUseCase import com.wire.kalium.logic.feature.call.usecase.GetIncomingCallsUseCase diff --git a/app/src/test/kotlin/com/wire/android/ui/common/topappbar/CommonTopAppBarViewModelTest.kt b/app/src/test/kotlin/com/wire/android/ui/common/topappbar/CommonTopAppBarViewModelTest.kt index a3908780ebd..efbbf2c8d61 100644 --- a/app/src/test/kotlin/com/wire/android/ui/common/topappbar/CommonTopAppBarViewModelTest.kt +++ b/app/src/test/kotlin/com/wire/android/ui/common/topappbar/CommonTopAppBarViewModelTest.kt @@ -25,11 +25,11 @@ import com.wire.android.util.CurrentScreen import com.wire.android.util.CurrentScreenManager import com.wire.kalium.logic.CoreLogic import com.wire.kalium.logic.GlobalKaliumScope +import com.wire.kalium.logic.data.auth.AccountInfo +import com.wire.kalium.logic.data.call.Call import com.wire.kalium.logic.data.id.ConversationId import com.wire.kalium.logic.data.sync.SyncState import com.wire.kalium.logic.data.user.UserId -import com.wire.kalium.logic.feature.auth.AccountInfo -import com.wire.kalium.logic.feature.call.Call import com.wire.kalium.logic.feature.call.usecase.ObserveEstablishedCallsUseCase import com.wire.kalium.logic.feature.session.CurrentSessionResult import com.wire.kalium.logic.sync.ObserveSyncStateUseCase diff --git a/app/src/test/kotlin/com/wire/android/ui/home/appLock/forgot/ForgotLockScreenViewModelTest.kt b/app/src/test/kotlin/com/wire/android/ui/home/appLock/forgot/ForgotLockScreenViewModelTest.kt index c8da6ab12f5..4adabf37d7e 100644 --- a/app/src/test/kotlin/com/wire/android/ui/home/appLock/forgot/ForgotLockScreenViewModelTest.kt +++ b/app/src/test/kotlin/com/wire/android/ui/home/appLock/forgot/ForgotLockScreenViewModelTest.kt @@ -29,16 +29,16 @@ import com.wire.android.notification.NotificationChannelsManager import com.wire.android.notification.WireNotificationManager import com.wire.kalium.logic.CoreLogic import com.wire.kalium.logic.StorageFailure +import com.wire.kalium.logic.data.auth.AccountInfo +import com.wire.kalium.logic.data.call.Call import com.wire.kalium.logic.data.conversation.ClientId import com.wire.kalium.logic.data.id.ConversationId import com.wire.kalium.logic.data.logout.LogoutReason import com.wire.kalium.logic.data.user.UserId import com.wire.kalium.logic.feature.UserSessionScope -import com.wire.kalium.logic.feature.auth.AccountInfo import com.wire.kalium.logic.feature.auth.LogoutUseCase import com.wire.kalium.logic.feature.auth.ValidatePasswordResult import com.wire.kalium.logic.feature.auth.ValidatePasswordUseCase -import com.wire.kalium.logic.feature.call.Call import com.wire.kalium.logic.feature.call.usecase.EndCallUseCase import com.wire.kalium.logic.feature.call.usecase.ObserveEstablishedCallsUseCase import com.wire.kalium.logic.feature.client.DeleteClientResult 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 b31b69c4806..5ef6120e0dc 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 @@ -47,6 +47,7 @@ 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.id.ConversationId +import com.wire.kalium.logic.data.message.SelfDeletionTimer import com.wire.kalium.logic.data.sync.SyncState import com.wire.kalium.logic.data.user.ConnectionState import com.wire.kalium.logic.data.user.OtherUser @@ -74,7 +75,6 @@ import com.wire.kalium.logic.feature.message.SendTextMessageUseCase import com.wire.kalium.logic.feature.message.ephemeral.EnqueueMessageSelfDeletionUseCase import com.wire.kalium.logic.feature.selfDeletingMessages.ObserveSelfDeletionTimerSettingsForConversationUseCase import com.wire.kalium.logic.feature.selfDeletingMessages.PersistNewSelfDeletionTimerUseCase -import com.wire.kalium.logic.feature.selfDeletingMessages.SelfDeletionTimer import com.wire.kalium.logic.feature.user.IsFileSharingEnabledUseCase import com.wire.kalium.logic.functional.Either import com.wire.kalium.logic.sync.ObserveSyncStateUseCase diff --git a/app/src/test/kotlin/com/wire/android/ui/home/conversations/MessageComposerViewModelTest.kt b/app/src/test/kotlin/com/wire/android/ui/home/conversations/MessageComposerViewModelTest.kt index d41a6d5e960..7b98d2e0cd7 100644 --- a/app/src/test/kotlin/com/wire/android/ui/home/conversations/MessageComposerViewModelTest.kt +++ b/app/src/test/kotlin/com/wire/android/ui/home/conversations/MessageComposerViewModelTest.kt @@ -32,8 +32,8 @@ import com.wire.android.ui.home.messagecomposer.state.ComposableMessageBundle import com.wire.android.ui.home.messagecomposer.state.Ping import com.wire.kalium.logic.data.asset.AttachmentType import com.wire.kalium.logic.data.conversation.Conversation +import com.wire.kalium.logic.data.message.SelfDeletionTimer import com.wire.kalium.logic.feature.asset.GetAssetSizeLimitUseCaseImpl.Companion.ASSET_SIZE_DEFAULT_LIMIT_BYTES -import com.wire.kalium.logic.feature.selfDeletingMessages.SelfDeletionTimer import io.mockk.coVerify import io.mockk.verify import kotlinx.coroutines.ExperimentalCoroutinesApi 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 fe0d6b98338..e165479ba8a 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 @@ -52,7 +52,7 @@ import com.wire.kalium.logic.feature.conversation.UpdateConversationMutedStatusU import com.wire.kalium.logic.feature.conversation.UpdateConversationReceiptModeUseCase import com.wire.kalium.logic.feature.publicuser.RefreshUsersWithoutMetadataUseCase import com.wire.kalium.logic.feature.selfDeletingMessages.ObserveSelfDeletionTimerSettingsForConversationUseCase -import com.wire.kalium.logic.feature.selfDeletingMessages.SelfDeletionTimer +import com.wire.kalium.logic.data.message.SelfDeletionTimer import com.wire.kalium.logic.feature.team.DeleteTeamConversationUseCase import com.wire.kalium.logic.feature.team.GetSelfTeamUseCase import com.wire.kalium.logic.feature.user.GetSelfUserUseCase diff --git a/app/src/test/kotlin/com/wire/android/ui/home/conversations/details/editselfdeletingmessages/EditSelfDeletingMessagesViewModelTest.kt b/app/src/test/kotlin/com/wire/android/ui/home/conversations/details/editselfdeletingmessages/EditSelfDeletingMessagesViewModelTest.kt index 745dc0a847e..401982f2684 100644 --- a/app/src/test/kotlin/com/wire/android/ui/home/conversations/details/editselfdeletingmessages/EditSelfDeletingMessagesViewModelTest.kt +++ b/app/src/test/kotlin/com/wire/android/ui/home/conversations/details/editselfdeletingmessages/EditSelfDeletingMessagesViewModelTest.kt @@ -28,7 +28,7 @@ import com.wire.android.ui.home.messagecomposer.SelfDeletionDuration import com.wire.android.ui.navArgs import com.wire.kalium.logic.feature.conversation.messagetimer.UpdateMessageTimerUseCase import com.wire.kalium.logic.feature.selfDeletingMessages.ObserveSelfDeletionTimerSettingsForConversationUseCase -import com.wire.kalium.logic.feature.selfDeletingMessages.SelfDeletionTimer +import com.wire.kalium.logic.data.message.SelfDeletionTimer import io.mockk.MockKAnnotations import io.mockk.coEvery import io.mockk.every diff --git a/app/src/test/kotlin/com/wire/android/ui/home/messagecomposer/recordaudio/RecordAudioViewModelTest.kt b/app/src/test/kotlin/com/wire/android/ui/home/messagecomposer/recordaudio/RecordAudioViewModelTest.kt index 011b1075bf2..172bc065a1c 100644 --- a/app/src/test/kotlin/com/wire/android/ui/home/messagecomposer/recordaudio/RecordAudioViewModelTest.kt +++ b/app/src/test/kotlin/com/wire/android/ui/home/messagecomposer/recordaudio/RecordAudioViewModelTest.kt @@ -24,11 +24,11 @@ import com.wire.android.media.audiomessage.AudioState import com.wire.android.media.audiomessage.RecordAudioMessagePlayer import com.wire.android.util.CurrentScreen import com.wire.android.util.CurrentScreenManager +import com.wire.kalium.logic.data.call.Call +import com.wire.kalium.logic.data.call.CallStatus import com.wire.kalium.logic.data.conversation.Conversation import com.wire.kalium.logic.data.id.ConversationId import com.wire.kalium.logic.feature.asset.GetAssetSizeLimitUseCaseImpl -import com.wire.kalium.logic.feature.call.Call -import com.wire.kalium.logic.feature.call.CallStatus import com.wire.kalium.logic.feature.call.usecase.ObserveEstablishedCallsUseCase import io.mockk.MockKAnnotations import io.mockk.coEvery diff --git a/app/src/test/kotlin/com/wire/android/ui/home/sync/FeatureFlagNotificationViewModelTest.kt b/app/src/test/kotlin/com/wire/android/ui/home/sync/FeatureFlagNotificationViewModelTest.kt index 65553bda1b9..542577cd682 100644 --- a/app/src/test/kotlin/com/wire/android/ui/home/sync/FeatureFlagNotificationViewModelTest.kt +++ b/app/src/test/kotlin/com/wire/android/ui/home/sync/FeatureFlagNotificationViewModelTest.kt @@ -6,9 +6,9 @@ import com.wire.android.ui.home.FeatureFlagState import com.wire.kalium.logic.CoreLogic import com.wire.kalium.logic.configuration.FileSharingStatus import com.wire.kalium.logic.configuration.GuestRoomLinkStatus +import com.wire.kalium.logic.data.auth.AccountInfo import com.wire.kalium.logic.data.sync.SyncState import com.wire.kalium.logic.data.user.UserId -import com.wire.kalium.logic.feature.auth.AccountInfo import com.wire.kalium.logic.feature.session.CurrentSessionResult import com.wire.kalium.logic.feature.session.CurrentSessionUseCase import com.wire.kalium.logic.feature.user.E2EIRequiredResult diff --git a/app/src/test/kotlin/com/wire/android/ui/settings/devices/DeviceDetailsViewModelTest.kt b/app/src/test/kotlin/com/wire/android/ui/settings/devices/DeviceDetailsViewModelTest.kt index cb4ef9d9c74..c03c92700bb 100644 --- a/app/src/test/kotlin/com/wire/android/ui/settings/devices/DeviceDetailsViewModelTest.kt +++ b/app/src/test/kotlin/com/wire/android/ui/settings/devices/DeviceDetailsViewModelTest.kt @@ -17,6 +17,7 @@ import com.wire.kalium.logic.feature.client.DeleteClientResult import com.wire.kalium.logic.feature.client.DeleteClientUseCase import com.wire.kalium.logic.feature.client.GetClientDetailsResult import com.wire.kalium.logic.feature.client.ObserveClientDetailsUseCase +import com.wire.kalium.logic.feature.client.Result import com.wire.kalium.logic.feature.client.UpdateClientVerificationStatusUseCase import com.wire.kalium.logic.feature.e2ei.usecase.GetE2EICertificateUseCaseResult import com.wire.kalium.logic.feature.e2ei.usecase.GetE2eiCertificateUseCase @@ -249,11 +250,11 @@ class DeviceDetailsViewModelTest { } fun withFingerprintSuccess() = apply { - coEvery { deviceFingerprint(any(), any()) } returns ClientFingerprintUseCase.Result.Success("fingerprint".encodeToByteArray()) + coEvery { deviceFingerprint(any(), any()) } returns Result.Success("fingerprint".encodeToByteArray()) } fun withFingerprintFailure() = apply { - coEvery { deviceFingerprint(any(), any()) } returns ClientFingerprintUseCase.Result.Failure( + coEvery { deviceFingerprint(any(), any()) } returns Result.Failure( NetworkFailure.NoNetworkConnection( IOException() ) diff --git a/app/src/test/kotlin/com/wire/android/util/DeepLinkProcessorTest.kt b/app/src/test/kotlin/com/wire/android/util/DeepLinkProcessorTest.kt index 98a503bba7c..43762ee1ee3 100644 --- a/app/src/test/kotlin/com/wire/android/util/DeepLinkProcessorTest.kt +++ b/app/src/test/kotlin/com/wire/android/util/DeepLinkProcessorTest.kt @@ -26,9 +26,9 @@ import com.wire.android.feature.SwitchAccountResult import com.wire.android.util.deeplink.DeepLinkProcessor import com.wire.android.util.deeplink.DeepLinkResult import com.wire.android.util.deeplink.SSOFailureCodes +import com.wire.kalium.logic.data.auth.AccountInfo import com.wire.kalium.logic.data.id.ConversationId import com.wire.kalium.logic.data.user.UserId -import com.wire.kalium.logic.feature.auth.AccountInfo import com.wire.kalium.logic.feature.session.CurrentSessionResult import com.wire.kalium.logic.feature.session.CurrentSessionUseCase import io.mockk.MockKAnnotations From 3d0c5861b325a0dcb49691f552762c8ede154b7e Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Tue, 7 Nov 2023 11:31:16 +0100 Subject: [PATCH 11/14] fix: test references --- .../kotlin/com/wire/android/ui/WireActivityViewModelTest.kt | 4 ++-- .../ui/home/messagecomposer/MessageComposerStateHolderTest.kt | 2 +- .../state/MessageCompositionInputStateHolderTest.kt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/test/kotlin/com/wire/android/ui/WireActivityViewModelTest.kt b/app/src/test/kotlin/com/wire/android/ui/WireActivityViewModelTest.kt index f2a360f17c5..3cb4ac1ff9c 100644 --- a/app/src/test/kotlin/com/wire/android/ui/WireActivityViewModelTest.kt +++ b/app/src/test/kotlin/com/wire/android/ui/WireActivityViewModelTest.kt @@ -43,12 +43,12 @@ import com.wire.android.util.deeplink.DeepLinkProcessor import com.wire.android.util.deeplink.DeepLinkResult import com.wire.android.util.newServerConfig import com.wire.kalium.logic.CoreLogic +import com.wire.kalium.logic.data.auth.AccountInfo +import com.wire.kalium.logic.data.auth.PersistentWebSocketStatus import com.wire.kalium.logic.data.id.ConversationId import com.wire.kalium.logic.data.id.QualifiedID import com.wire.kalium.logic.data.user.UserId import com.wire.kalium.logic.feature.appVersioning.ObserveIfAppUpdateRequiredUseCase -import com.wire.kalium.logic.feature.auth.AccountInfo -import com.wire.kalium.logic.feature.auth.PersistentWebSocketStatus import com.wire.kalium.logic.feature.client.ClearNewClientsForUserUseCase import com.wire.kalium.logic.feature.client.NewClientResult import com.wire.kalium.logic.feature.client.ObserveNewClientsUseCase diff --git a/app/src/test/kotlin/com/wire/android/ui/home/messagecomposer/MessageComposerStateHolderTest.kt b/app/src/test/kotlin/com/wire/android/ui/home/messagecomposer/MessageComposerStateHolderTest.kt index bcb4a2a60c4..b71de43adca 100644 --- a/app/src/test/kotlin/com/wire/android/ui/home/messagecomposer/MessageComposerStateHolderTest.kt +++ b/app/src/test/kotlin/com/wire/android/ui/home/messagecomposer/MessageComposerStateHolderTest.kt @@ -37,7 +37,7 @@ import com.wire.android.ui.home.messagecomposer.state.MessageCompositionHolder import com.wire.android.ui.home.messagecomposer.state.MessageCompositionInputStateHolder import com.wire.android.ui.home.messagecomposer.state.MessageCompositionType import com.wire.android.ui.home.messagecomposer.state.MessageType -import com.wire.kalium.logic.feature.selfDeletingMessages.SelfDeletionTimer +import com.wire.kalium.logic.data.message.SelfDeletionTimer import io.mockk.MockKAnnotations import io.mockk.impl.annotations.MockK import kotlinx.coroutines.ExperimentalCoroutinesApi diff --git a/app/src/test/kotlin/com/wire/android/ui/home/messagecomposer/state/MessageCompositionInputStateHolderTest.kt b/app/src/test/kotlin/com/wire/android/ui/home/messagecomposer/state/MessageCompositionInputStateHolderTest.kt index 2ebca6f056b..0ae7e72c4ee 100644 --- a/app/src/test/kotlin/com/wire/android/ui/home/messagecomposer/state/MessageCompositionInputStateHolderTest.kt +++ b/app/src/test/kotlin/com/wire/android/ui/home/messagecomposer/state/MessageCompositionInputStateHolderTest.kt @@ -4,7 +4,7 @@ import androidx.compose.runtime.MutableState import androidx.compose.runtime.mutableStateOf import androidx.compose.ui.unit.dp import com.wire.android.config.CoroutineTestExtension -import com.wire.kalium.logic.feature.selfDeletingMessages.SelfDeletionTimer +import com.wire.kalium.logic.data.message.SelfDeletionTimer import kotlinx.coroutines.ExperimentalCoroutinesApi import org.amshove.kluent.shouldBeEqualTo import org.junit.jupiter.api.BeforeEach From 55a5d2c29818ac392b067be8b3c340030a216165 Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Tue, 7 Nov 2023 12:43:57 +0100 Subject: [PATCH 12/14] chore: kalium ref --- kalium | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kalium b/kalium index f74b012e7db..9a38a903c67 160000 --- a/kalium +++ b/kalium @@ -1 +1 @@ -Subproject commit f74b012e7db3f438d90e678e67f1764ace5c57a7 +Subproject commit 9a38a903c678a286c19fc8f07370ea19e6322ab9 From 2a9196930019df4981ec5e5947ef6f1a1ff398d4 Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Wed, 8 Nov 2023 10:57:54 +0100 Subject: [PATCH 13/14] chore: kalium ref --- kalium | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kalium b/kalium index 33129c1afa4..19b37238cf4 160000 --- a/kalium +++ b/kalium @@ -1 +1 @@ -Subproject commit 33129c1afa4b511ba3cc00325778649c351bd503 +Subproject commit 19b37238cf4890583da7c836eeaf45cea6f4aba1 From 353b674cb372806b5dc51ff175d92b5a82b9c8d5 Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Wed, 8 Nov 2023 12:31:51 +0100 Subject: [PATCH 14/14] chore: kalium ref --- kalium | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kalium b/kalium index 19b37238cf4..603c0a38cbe 160000 --- a/kalium +++ b/kalium @@ -1 +1 @@ -Subproject commit 19b37238cf4890583da7c836eeaf45cea6f4aba1 +Subproject commit 603c0a38cbee6df848fe4455a507cc49db78a609