Timeline
A Timeline instance represents a contiguous sequence of events in a room.
There are two kinds of timeline:
- live timelines: they process live events from the sync. You can paginate backwards but not forwards.
- past timelines: they start in the past from an `initialEventId`. You can paginate backwards and forwards.
Types
This is used to paginate in one or another direction.
Pagination state.
Functions
This is the same than the regular paginate method but waits for the results instead of relying on the timeline listener.
Returns the index of a built event or null.
Returns the current pagination state for the direction.
Returns a snapshot of the timeline in his current state.
Check if the timeline can be enriched by paginating.
This is the main method to enrich the timeline with new data. It will call the onTimelineUpdated method from Listener when the data will be processed. It also ensures only one pagination by direction is launched at a time, so you can safely call this multiple time in a row.
This method restarts the timeline, erases all built events and pagination states. It then loads events around the eventId. If eventId is null, it does restart the live timeline.