Room navigation : add a JoinedRoomFlowNode so we use RoomFlowNode for managing different routes
This commit is contained in:
parent
4a2703810b
commit
5a192b49d7
11 changed files with 298 additions and 78 deletions
|
|
@ -17,7 +17,15 @@
|
|||
package io.element.android.libraries.matrix.api.roomlist
|
||||
|
||||
import androidx.compose.runtime.Immutable
|
||||
import io.element.android.libraries.matrix.api.core.RoomId
|
||||
import io.element.android.libraries.matrix.api.room.CurrentUserMembership
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
import kotlinx.coroutines.flow.combine
|
||||
import kotlinx.coroutines.flow.distinctUntilChanged
|
||||
import kotlinx.coroutines.flow.flowOn
|
||||
import kotlinx.coroutines.flow.map
|
||||
import java.util.Optional
|
||||
|
||||
/**
|
||||
* Entry point for the room list api.
|
||||
|
|
@ -77,4 +85,11 @@ interface RoomListService {
|
|||
* The state of the service as a flow.
|
||||
*/
|
||||
val state: StateFlow<State>
|
||||
|
||||
/**
|
||||
* Get a flow of the room summary for a given room id.
|
||||
*/
|
||||
fun getUserMembershipForRoom(roomId: RoomId): Flow<Optional<CurrentUserMembership>>
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue