Skip to content

Commit

Permalink
Commit with unresolved merge conflicts outside of kalium
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamadJaara authored and github-actions[bot] committed Mar 21, 2024
1 parent 50ccd98 commit 947f5de
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 7 deletions.
5 changes: 5 additions & 0 deletions app/src/main/kotlin/com/wire/android/di/CoreLogicModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,11 @@ class UseCaseModule {
@CurrentAccount currentAccount: UserId
) = coreLogic.getSessionScope(currentAccount).getPersistentWebSocketStatus

@ViewModelScoped
@Provides
fun provideCheckCrlRevocationListUseCase(@KaliumCoreLogic coreLogic: CoreLogic, @CurrentAccount currentAccount: UserId) =
coreLogic.getSessionScope(currentAccount).checkCrlRevocationList

@ViewModelScoped
@Provides
fun provideIsMLSEnabledUseCase(@KaliumCoreLogic coreLogic: CoreLogic, @CurrentAccount currentAccount: UserId) =
Expand Down
56 changes: 52 additions & 4 deletions app/src/main/kotlin/com/wire/android/ui/debug/DebugDataOptions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ import com.wire.kalium.logic.CoreFailure
import com.wire.kalium.logic.E2EIFailure
import com.wire.kalium.logic.data.user.UserId
import com.wire.kalium.logic.feature.debug.DisableEventProcessingUseCase
import com.wire.kalium.logic.feature.e2ei.CheckCrlRevocationListUseCase
import com.wire.kalium.logic.feature.e2ei.usecase.E2EIEnrollmentResult
import com.wire.kalium.logic.feature.keypackage.MLSKeyPackageCountResult
import com.wire.kalium.logic.feature.keypackage.MLSKeyPackageCountUseCase
Expand Down Expand Up @@ -98,6 +99,7 @@ class DebugDataOptionsViewModel
private val mlsKeyPackageCountUseCase: MLSKeyPackageCountUseCase,
private val restartSlowSyncProcessForRecovery: RestartSlowSyncProcessForRecoveryUseCase,
private val disableEventProcessingUseCase: DisableEventProcessingUseCase,
private val checkCrlRevocationListUseCase: CheckCrlRevocationListUseCase
) : ViewModel() {

var state by mutableStateOf(
Expand All @@ -114,6 +116,14 @@ class DebugDataOptionsViewModel
)
}

fun checkCrlRevocationList() {
viewModelScope.launch {
checkCrlRevocationListUseCase(
forceUpdate = true
)
}
}

fun enableEncryptedProteusStorage(enabled: Boolean) {
if (enabled) {
viewModelScope.launch {
Expand Down Expand Up @@ -248,7 +258,8 @@ fun DebugDataOptions(
onDisableEventProcessingChange = viewModel::disableEventProcessing,
enrollE2EICertificate = viewModel::enrollE2EICertificate,
handleE2EIEnrollmentResult = viewModel::handleE2EIEnrollmentResult,
dismissCertificateDialog = viewModel::dismissCertificateDialog
dismissCertificateDialog = viewModel::dismissCertificateDialog,
checkCrlRevocationList = viewModel::checkCrlRevocationList
)
}

Expand All @@ -266,7 +277,8 @@ fun DebugDataOptionsContent(
onManualMigrationPressed: () -> Unit,
enrollE2EICertificate: () -> Unit,
handleE2EIEnrollmentResult: (Either<CoreFailure, E2EIEnrollmentResult>) -> Unit,
dismissCertificateDialog: () -> Unit
dismissCertificateDialog: () -> Unit,
checkCrlRevocationList: () -> Unit
) {
Column {

Expand Down Expand Up @@ -303,6 +315,16 @@ fun DebugDataOptionsContent(
)
if (BuildConfig.PRIVATE_BUILD) {

SettingsItem(
title = stringResource(R.string.debug_id),
text = state.debugId,
trailingIcon = R.drawable.ic_copy,
onIconPressed = Clickable(
enabled = true,
onClick = { }
)
)

SettingsItem(
title = stringResource(R.string.debug_id),
text = state.debugId,
Expand Down Expand Up @@ -352,7 +374,8 @@ fun DebugDataOptionsContent(
isEventProcessingEnabled = state.isEventProcessingDisabled,
onDisableEventProcessingChange = onDisableEventProcessingChange,
onRestartSlowSyncForRecovery = onRestartSlowSyncForRecovery,
onForceUpdateApiVersions = onForceUpdateApiVersions
onForceUpdateApiVersions = onForceUpdateApiVersions,
checkCrlRevocationList = checkCrlRevocationList
)
}

Expand Down Expand Up @@ -520,7 +543,8 @@ private fun DebugToolsOptions(
isEventProcessingEnabled: Boolean,
onDisableEventProcessingChange: (Boolean) -> Unit,
onRestartSlowSyncForRecovery: () -> Unit,
onForceUpdateApiVersions: () -> Unit
onForceUpdateApiVersions: () -> Unit,
checkCrlRevocationList: () -> Unit
) {
FolderHeader(stringResource(R.string.label_debug_tools_title))
Column {
Expand Down Expand Up @@ -548,6 +572,29 @@ private fun DebugToolsOptions(
)
}
)

// checkCrlRevocationList
RowItemTemplate(
modifier = Modifier.wrapContentWidth(),
title = {
Text(
style = MaterialTheme.wireTypography.body01,
color = MaterialTheme.wireColorScheme.onBackground,
text = "CRL revocation check",
modifier = Modifier.padding(start = dimensions().spacing8x)
)
},
actions = {
WirePrimaryButton(
minSize = MaterialTheme.wireDimensions.buttonMediumMinSize,
minClickableSize = MaterialTheme.wireDimensions.buttonMinClickableSize,
onClick = checkCrlRevocationList,
text = stringResource(R.string.debug_settings_force_api_versioning_update_button_text),
fillMaxWidth = false
)
}
)

RowItemTemplate(
modifier = Modifier.wrapContentWidth(),
title = {
Expand Down Expand Up @@ -625,5 +672,6 @@ fun PreviewOtherDebugOptions() {
enrollE2EICertificate = {},
handleE2EIEnrollmentResult = {},
dismissCertificateDialog = {},
checkCrlRevocationList = {}
)
}
4 changes: 2 additions & 2 deletions app/src/main/kotlin/com/wire/android/ui/debug/DebugScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ fun DebugScreen(navigator: Navigator) {
private fun UserDebugContent(
onNavigationPressed: () -> Unit,
onManualMigrationPressed: (currentAccount: UserId) -> Unit,
) {
userDebugViewModel: UserDebugViewModel = hiltViewModel(),

val userDebugViewModel: UserDebugViewModel = hiltViewModel()
) {
val debugContentState: DebugContentState = rememberDebugContentState(userDebugViewModel.logPath)

WireScaffold(
Expand Down
2 changes: 1 addition & 1 deletion kalium
Submodule kalium updated 25 files
+27 βˆ’0 logic/src/commonMain/kotlin/com/wire/kalium/logic/data/message/draft/MessageDraft.kt
+36 βˆ’0 logic/src/commonMain/kotlin/com/wire/kalium/logic/data/message/draft/MessageDraftMapper.kt
+50 βˆ’0 logic/src/commonMain/kotlin/com/wire/kalium/logic/data/message/draft/MessageDraftRepository.kt
+1 βˆ’1 logic/src/commonMain/kotlin/com/wire/kalium/logic/data/message/mention/MessageMentionMapper.kt
+6 βˆ’7 logic/src/commonMain/kotlin/com/wire/kalium/logic/data/user/UserRepository.kt
+8 βˆ’0 logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/UserSessionScope.kt
+17 βˆ’0 logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/message/MessageScope.kt
+44 βˆ’0 logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/message/draft/GetMessageDraftUseCase.kt
+41 βˆ’0 logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/message/draft/RemoveMessageDraftUseCase.kt
+44 βˆ’0 logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/message/draft/SaveMessageDraftUseCase.kt
+147 βˆ’0 logic/src/commonTest/kotlin/com/wire/kalium/logic/data/message/draft/MessageDraftRepositoryTest.kt
+1 βˆ’1 logic/src/commonTest/kotlin/com/wire/kalium/logic/data/user/UserRepositoryTest.kt
+119 βˆ’0 logic/src/commonTest/kotlin/com/wire/kalium/logic/feature/message/draft/GetMessageDraftUseCaseTest.kt
+72 βˆ’0 logic/src/commonTest/kotlin/com/wire/kalium/logic/feature/message/draft/RemoveMessageDraftUseCaseTest.kt
+85 βˆ’0 logic/src/commonTest/kotlin/com/wire/kalium/logic/feature/message/draft/SaveMessageDraftUseCaseTest.kt
+31 βˆ’0 persistence/src/commonMain/db_user/com/wire/kalium/persistence/MessageDrafts.sq
+16 βˆ’0 persistence/src/commonMain/db_user/migrations/79.sqm
+36 βˆ’0 persistence/src/commonMain/kotlin/com/wire/kalium/persistence/adapter/MentionListAdapter.kt
+1 βˆ’1 persistence/src/commonMain/kotlin/com/wire/kalium/persistence/dao/message/MessageDAOImpl.kt
+27 βˆ’0 persistence/src/commonMain/kotlin/com/wire/kalium/persistence/dao/message/draft/MessageDraftDAO.kt
+56 βˆ’0 persistence/src/commonMain/kotlin/com/wire/kalium/persistence/dao/message/draft/MessageDraftDAOImpl.kt
+27 βˆ’0 persistence/src/commonMain/kotlin/com/wire/kalium/persistence/dao/message/draft/MessageDraftEntity.kt
+7 βˆ’0 persistence/src/commonMain/kotlin/com/wire/kalium/persistence/db/TableMapper.kt
+8 βˆ’1 persistence/src/commonMain/kotlin/com/wire/kalium/persistence/db/UserDatabaseBuilder.kt
+150 βˆ’0 persistence/src/commonTest/kotlin/com/wire/kalium/persistence/dao/message/draft/MessageDraftDAOTest.kt

0 comments on commit 947f5de

Please sign in to comment.