RoomDirectory : continue improving interactions
This commit is contained in:
parent
153e88dade
commit
b900818001
14 changed files with 171 additions and 86 deletions
|
|
@ -21,6 +21,10 @@ import kotlinx.coroutines.flow.Flow
|
|||
interface RoomDirectoryList {
|
||||
suspend fun filter(filter: String?, batchSize: Int): Result<Unit>
|
||||
suspend fun loadMore(): Result<Unit>
|
||||
suspend fun hasMoreToLoad(): Boolean
|
||||
val items: Flow<List<RoomDescription>>
|
||||
val state: Flow<State>
|
||||
|
||||
data class State(
|
||||
val hasMoreToLoad: Boolean,
|
||||
val items: List<RoomDescription>,
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@
|
|||
|
||||
package io.element.android.libraries.matrix.api.roomdirectory
|
||||
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
|
||||
interface RoomDirectoryService {
|
||||
fun createRoomDirectoryList(): RoomDirectoryList
|
||||
fun createRoomDirectoryList(scope: CoroutineScope): RoomDirectoryList
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue