Sync: use the new SyncIndicator api

This commit is contained in:
ganfra 2023-09-07 17:03:52 +02:00
parent f96ba8c183
commit 6f86fca2c2
5 changed files with 49 additions and 15 deletions

View file

@ -32,6 +32,11 @@ interface RoomListService {
data object Terminated : State()
}
sealed class SyncIndicator {
data object Show : SyncIndicator()
data object Hide : SyncIndicator()
}
/**
* returns a [RoomList] object of all rooms we want to display.
* This will exclude some rooms like the invites, or spaces.
@ -49,6 +54,11 @@ interface RoomListService {
*/
fun updateAllRoomsVisibleRange(range: IntRange)
/**
* The sync indicator as a flow.
*/
val syncIndicator: StateFlow<SyncIndicator>
/**
* The state of the service as a flow.
*/