mirror of
https://github.com/bbara04/Purefin.git
synced 2026-07-23 19:26:50 +00:00
feat: implement logout functionality and settings provider
This commit is contained in:
@@ -51,5 +51,15 @@ class DataStoreUserSessionRepository @Inject constructor(
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun logout() {
|
||||
userSessionDataStore.updateData {
|
||||
it.copy(
|
||||
accessToken = "",
|
||||
userId = null,
|
||||
loggedIn = false
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
override val isOfflineMode: Flow<Boolean> = session.map { it.isOfflineMode }.distinctUntilChanged()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user