From 3917dad4a1fc809a2f3e25d98a7ac2b9552e72f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Saleniuk?= Date: Tue, 10 Dec 2024 18:41:16 +0100 Subject: [PATCH] fix detekt --- .../wire/kalium/logic/feature/debug/ChangeProfilingUseCase.kt | 4 ++++ .../com/wire/kalium/persistence/db/UserDatabaseBuilder.kt | 1 + 2 files changed, 5 insertions(+) diff --git a/logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/debug/ChangeProfilingUseCase.kt b/logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/debug/ChangeProfilingUseCase.kt index 2b7d03405e5..83588fea472 100644 --- a/logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/debug/ChangeProfilingUseCase.kt +++ b/logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/debug/ChangeProfilingUseCase.kt @@ -22,6 +22,10 @@ import com.wire.kalium.logic.di.UserStorage class ChangeProfilingUseCase( private val userStorage: UserStorage, ) { + /** + * Changes the profiling of the database (cipher_profile) if the profile is specified and the database is encrypted + * @param enabled true to enable profiling, false to disable + */ operator fun invoke(enabled: Boolean) { userStorage.database.changeProfiling(enabled) } diff --git a/persistence/src/commonMain/kotlin/com/wire/kalium/persistence/db/UserDatabaseBuilder.kt b/persistence/src/commonMain/kotlin/com/wire/kalium/persistence/db/UserDatabaseBuilder.kt index b035511e948..fdf7c7bac9e 100644 --- a/persistence/src/commonMain/kotlin/com/wire/kalium/persistence/db/UserDatabaseBuilder.kt +++ b/persistence/src/commonMain/kotlin/com/wire/kalium/persistence/db/UserDatabaseBuilder.kt @@ -112,6 +112,7 @@ internal expect fun userDatabaseDriverByPath( enableWAL: Boolean ): SqlDriver +@Suppress("LongParameterList") class UserDatabaseBuilder internal constructor( private val userId: UserIDEntity, internal val sqlDriver: SqlDriver,