TimelineImpl

class TimelineImpl(roomId: RoomId, decryptionTimeout: Duration = INFINITE, fetchTimeout: Duration = 1.minutes, limitPerFetch: Long = 20, loadingSize: Long = limitPerFetch, roomService: RoomService) : TimelineBase

Constructors

Link copied to clipboard
fun TimelineImpl(roomId: RoomId, decryptionTimeout: Duration = INFINITE, fetchTimeout: Duration = 1.minutes, limitPerFetch: Long = 20, loadingSize: Long = limitPerFetch, roomService: RoomService)

Functions

Link copied to clipboard
open suspend override fun init(startFrom: EventId): List<Flow<TimelineEvent>>

Initialize the timeline with the start event.

Link copied to clipboard
open suspend override fun loadAfter(): List<Flow<TimelineEvent>>

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(): List<Flow<TimelineEvent>>

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 canLoadAfter: Flow<Boolean>

Is true until last known TimelineEvent is reached.

Link copied to clipboard
open override val canLoadBefore: Flow<Boolean>

Is true until start of timeline is reached.

Link copied to clipboard
override val events: Flow<List<Flow<TimelineEvent>>>

TimelineEvents sorted with higher indexes being more recent.

Link copied to clipboard
override val isInitialized: StateFlow<Boolean>

True when timeline initialization has been finished.

Link copied to clipboard
override val isLoadingAfter: StateFlow<Boolean>

True while events are loaded after.

Link copied to clipboard
override val isLoadingBefore: StateFlow<Boolean>

True while events are loaded before.

Link copied to clipboard
override val lastLoadedEventIdAfter: Flow<EventId?>

Upper bound of loaded events in this timeline.

Link copied to clipboard
override val lastLoadedEventIdBefore: Flow<EventId?>

Lower bound of loaded events in this timeline.