Move cache management to a dedicated class and in the setting module, for clarity.

This commit is contained in:
Benoit Marty 2023-06-23 15:38:04 +02:00 committed by Benoit Marty
parent cc1c3c8f7b
commit b6920afb7f
7 changed files with 74 additions and 32 deletions

View file

@ -65,16 +65,6 @@ class FakeAuthenticationService : MatrixAuthenticationService {
loginError?.let { Result.failure(it) } ?: Result.success(A_USER_ID)
}
private val cacheIndexFlow = MutableStateFlow(0)
override fun cacheIndex(): Flow<Int> {
return cacheIndexFlow
}
override fun incrementCacheIndex() {
cacheIndexFlow.value++
}
override suspend fun getOidcUrl(): Result<OidcDetails> = simulateLongTask {
oidcError?.let { Result.failure(it) } ?: Result.success(A_OIDC_DATA)
}