Исправлено множество предупреждений

This commit is contained in:
2026-05-19 01:42:22 +03:00
parent eecaf44b72
commit ffdab4563d
64 changed files with 241 additions and 567 deletions

View File

@@ -14,7 +14,7 @@ kotlin {
}
dependencies {
compileOnly("javax.inject:javax.inject:1")
compileOnly(libs.javax.inject)
implementation(project(":domain"))
implementation(libs.kotlinx.coroutines.core)
implementation(libs.kotlinx.serialization.json)

View File

@@ -67,11 +67,4 @@ class ManageStoragesEncryptionUseCase @Inject constructor(
unlockManager.close(storage)
}
suspend fun changePassword(storage: IStorageInfo, newKey: EncryptKey, encryptPath: Boolean) {
if (storage !is IStorage) return
if (storage.metaInfo.value.encInfo == null) {
throw IllegalStateException("Storage is not encrypted")
}
storage.setEncInfo(Encryptor.generateEncryptionInfo(newKey, encryptPath))
}
}

View File

@@ -34,7 +34,6 @@ class RunStorageSyncUseCase @Inject constructor(
* @param logReason техническая метка для логов (не для UI)
* @return false, если синхронизация уже в очереди или выполняется — новая задача не создана
*/
@Suppress("UNUSED_PARAMETER")
fun enqueue(displayTitle: String, logReason: String): Boolean {
if (!running.compareAndSet(false, true)) {
return false

View File

@@ -4,12 +4,8 @@ import com.github.nullptroma.wallenc.domain.datatypes.EncryptKey
import com.github.nullptroma.wallenc.domain.interfaces.IStorage
import com.github.nullptroma.wallenc.domain.interfaces.StorageSyncGroup
import com.github.nullptroma.wallenc.domain.interfaces.StorageSyncGroupEncryptionKind
import java.util.Base64
import java.util.UUID
fun storageEncryptionSecret(key: EncryptKey): String =
Base64.getEncoder().encodeToString(key.bytes)
fun isStorageCompatibleWithGroup(
storage: IStorage,
group: StorageSyncGroup,

View File

@@ -3,7 +3,6 @@ package com.github.nullptroma.wallenc.usecases
import com.github.nullptroma.wallenc.domain.interfaces.IStorageSyncGroupStore
import com.github.nullptroma.wallenc.domain.interfaces.IVaultsManager
import kotlinx.coroutines.delay
import java.util.UUID
import javax.inject.Inject
import javax.inject.Singleton