TimelineImpl

class TimelineImpl<T>(roomId: RoomId, decryptionTimeout: Duration = INFINITE, fetchTimeout: Duration = 1.minutes, limitPerFetch: Long = 20, loadingSize: Long = limitPerFetch, roomService: RoomService, transformer: suspend (Flow<TimelineEvent>) -> T) : TimelineBase<T>

Constructors

Link copied to clipboard
fun <T> TimelineImpl(roomId: RoomId, decryptionTimeout: Duration = INFINITE, fetchTimeout: Duration = 1.minutes, limitPerFetch: Long = 20, loadingSize: Long = limitPerFetch, roomService: RoomService, transformer: suspend (Flow<TimelineEvent>) -> T)

Functions

Link copied to clipboard
open suspend override fun init(startFrom: EventId): TimelineStateChange<T>

Initialize the timeline with the start event.

Link copied to clipboard
open suspend override fun loadAfter(): TimelineStateChange<T>

Load new events after the newest event. This may suspend until at least one event can be loaded.

Link copied to clipboard
open suspend override fun loadBefore(): TimelineStateChange<T>

Load new events before the oldest event. This may suspend until at least one event can be loaded.

Properties

Link copied to clipboard
open override val state: Flow<TimelineState<T>>

The current state of the timeline.

Link copied to clipboard
val transformer: suspend (Flow<TimelineEvent>) -> T