Observe session database to be able to detect new user and removed user.

This commit is contained in:
Benoit Marty
2023-03-31 22:17:19 +02:00
committed by Benoit Marty
parent 7ff72d480c
commit 35c7bffc45
7 changed files with 191 additions and 6 deletions
@@ -30,6 +30,10 @@ class InMemorySessionStore : SessionStore {
return sessionDataFlow.map { it != null }
}
override fun sessionsFlow(): Flow<List<SessionData>> {
return sessionDataFlow.map { listOfNotNull(it) }
}
override suspend fun storeData(sessionData: SessionData) {
sessionDataFlow.value = sessionData
}