mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 06:55:41 +00:00
Add test on DefaultClearCacheUseCase
This commit is contained in:
+4
-1
@@ -19,7 +19,9 @@ package io.element.android.features.roomlist.impl.migration
|
||||
import io.element.android.features.roomlist.api.migration.MigrationScreenStore
|
||||
import io.element.android.libraries.matrix.api.core.SessionId
|
||||
|
||||
class InMemoryMigrationScreenStore : MigrationScreenStore {
|
||||
class InMemoryMigrationScreenStore(
|
||||
private val resetLambda: () -> Unit = { }
|
||||
) : MigrationScreenStore {
|
||||
private val store = mutableMapOf<SessionId, Boolean>()
|
||||
|
||||
override fun isMigrationScreenNeeded(sessionId: SessionId): Boolean {
|
||||
@@ -33,5 +35,6 @@ class InMemoryMigrationScreenStore : MigrationScreenStore {
|
||||
|
||||
override fun reset() {
|
||||
store.clear()
|
||||
resetLambda()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user