Improve API and documentation

This commit is contained in:
Benoit Marty 2025-10-21 11:53:36 +02:00
parent 0f3858649c
commit 64b5b53510
9 changed files with 22 additions and 15 deletions

View file

@ -75,9 +75,9 @@ fun Flow<List<SessionData>>.toUserListFlow(): Flow<List<String>> {
}
/**
* @return a flow emitting the userId of the latest session if logged in, null otherwise.
* @return a flow emitting the sessionId of the latest session if logged in, null otherwise.
*/
fun SessionStore.userIdFlow(): Flow<String?> {
fun SessionStore.sessionIdFlow(): Flow<String?> {
return loggedInStateFlow().map {
when (it) {
is LoggedInState.LoggedIn -> it.sessionId