init

abstract suspend fun init(startFrom: EventId, configStart: GetTimelineEventConfig.() -> Unit = {}, configBefore: GetTimelineEventsConfig.() -> Unit = {}, configAfter: GetTimelineEventsConfig.() -> Unit = {}): TimelineStateChange<T>

Initialize the timeline with the start event.

Consider wrapping this method call in a timeout, since it might fetch the start event from the server if it is not found locally.

The timeline can be initialized multiple times from different starting events. If doing so, it must be ensured, that there is no running call to loadBefore or loadAfter. Otherwise init will suspend until loadBefore or loadAfter are finished.

Parameters

startFrom

The event id to try start timeline generation from.

configStart

The config for getting the startFrom.

configBefore

The config for getting TimelineEvents before startFrom.

configAfter

The config for getting TimelineEvents after startFrom.