Subscribe to RoomListItems in the visible range (#3169)
* Subscribe to `RoomListItems` in the visible range This ensures the room list items always have updated info.
This commit is contained in:
parent
0be7058416
commit
5944f112fb
16 changed files with 204 additions and 17 deletions
|
|
@ -17,6 +17,7 @@
|
|||
package io.element.android.libraries.matrix.api.roomlist
|
||||
|
||||
import androidx.compose.runtime.Immutable
|
||||
import io.element.android.libraries.matrix.api.core.RoomId
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
import kotlinx.coroutines.flow.filterIsInstance
|
||||
|
|
@ -53,6 +54,12 @@ interface RoomListService {
|
|||
source: RoomList.Source,
|
||||
): DynamicRoomList
|
||||
|
||||
/**
|
||||
* Subscribes to sync requests for the visible rooms.
|
||||
* @param roomIds the list of visible room ids to subscribe to.
|
||||
*/
|
||||
suspend fun subscribeToVisibleRooms(roomIds: List<RoomId>)
|
||||
|
||||
/**
|
||||
* Returns a [DynamicRoomList] object of all rooms we want to display.
|
||||
* If you want to get a filtered room list, consider using [createRoomList].
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue