Dispose для EncryptedStorage

This commit is contained in:
Roman Pytkov
2026-03-20 13:35:47 +03:00
parent ad7c210679
commit 7094517264
4 changed files with 30 additions and 10 deletions

View File

@@ -22,7 +22,13 @@ class UnlockManager(dao: StorageKeyDao, ioDispatcher: CoroutineDispatcher): IUnl
TODO("Not yet implemented")
}
override fun close(storage: IStorage) {
TODO("Not yet implemented")
override fun close(uuid: UUID) {
val enc = _openedStorages.value[uuid]
if(enc == null)
return
_openedStorages.value = _openedStorages.value.toMutableMap().apply {
remove(uuid)
}
enc.dispose()
}
}