Timeline

interface Timeline<T>

This is an abstraction for a timeline. Call init first!

Functions

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

Initialize the timeline with the start event.

Link copied to clipboard
abstract suspend 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
abstract suspend 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
abstract val state: Flow<TimelineState<T>>

The current state of the timeline.

Inheritors

Link copied to clipboard