Timeline: use val instead of fun for flows

This commit is contained in:
ganfra 2023-06-29 17:58:00 +02:00
parent c0106a692c
commit 3aa5cce8dc
6 changed files with 27 additions and 44 deletions

View file

@ -82,11 +82,7 @@ class RoomListScreen(
withContext(coroutineDispatchers.io) {
matrixClient.getRoom(roomId)!!.use { room ->
room.open()
val timeline = room.timeline
timeline.apply {
// TODO This doesn't work reliably as initialize is asynchronous, and the timeline can't be used until it's finished
paginateBackwards(20, 50)
}
room.timeline.paginateBackwards(20, 50)
}
}
}