get Timeline Events Around
fun RoomService.getTimelineEventsAround(roomId: RoomId, startFrom: EventId, decryptionTimeout: Duration = Duration.INFINITE, fetchTimeout: Duration = 1.minutes, limitPerFetch: Long = 20, maxSizeBefore: StateFlow<Int>, maxSizeAfter: StateFlow<Int>): Flow<List<Flow<TimelineEvent>>>
Returns all timeline events around a starting event sorted with higher indexes being more recent.
The size of the returned list can be expanded in 2 directions: before and after the start element.
Parameters
start From
the start event id
max Size Before
how many events to possibly get before the start event
max Size After
how many events to possibly get after the start event
suspend fun RoomService.getTimelineEventsAround(roomId: RoomId, startFrom: EventId, decryptionTimeout: Duration = Duration.INFINITE, fetchTimeout: Duration = 1.minutes, limitPerFetch: Long = 20, minSizeBefore: Long? = 2, minSizeAfter: Long? = minSizeBefore, maxSizeBefore: Long = 10, maxSizeAfter: Long = maxSizeBefore): List<Flow<TimelineEvent>>
Returns all timeline events around a starting event.