RoomDirectory : continue implementing the search

This commit is contained in:
ganfra 2024-03-25 11:17:19 +01:00
parent 01e6b46323
commit 4c5ae6ae4b
13 changed files with 190 additions and 247 deletions

View file

@ -16,11 +16,11 @@
package io.element.android.libraries.matrix.api.roomdirectory
import kotlinx.coroutines.flow.SharedFlow
import kotlinx.coroutines.flow.Flow
interface RoomDirectorySearch {
suspend fun updateQuery(query: String?, batchSize: Int)
interface RoomDirectoryList {
suspend fun filter(filter: String?, batchSize: Int)
suspend fun loadMore()
suspend fun hasMoreToLoad(): Boolean
val results: SharedFlow<List<RoomDescription>>
val items: Flow<List<RoomDescription>>
}

View file

@ -17,5 +17,5 @@
package io.element.android.libraries.matrix.api.roomdirectory
interface RoomDirectoryService {
fun search(): RoomDirectorySearch
fun createRoomDirectoryList(): RoomDirectoryList
}