init

open suspend override fun init(roomId: RoomId, 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. It tries to re-use elements.

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.