Enumeration SlidingSyncEvent

Events which can be fired by the SlidingSync class. These are designed to provide different levels of information when processing sync responses.

  • RoomData: concerns rooms, useful for SlidingSyncSdk to update its knowledge of rooms.
  • Lifecycle: concerns callbacks at various well-defined points in the sync process.
  • List: concerns lists, useful for UI layers to re-render room lists. Specifically, the order of event invocation is:
  • Lifecycle (state=RequestFinished)
  • RoomData (N times)
  • Lifecycle (state=Complete)
  • List (at most once per list)

Enumeration Members

Enumeration Members

Lifecycle: "SlidingSync.Lifecycle"

This event fires at various points in the /sync loop lifecycle.

  • SlidingSyncState.RequestFinished: Fires after we receive a valid response but before the response has been processed. Perform any pre-process steps here. If there was a problem syncing, err will be set (e.g network errors).
  • SlidingSyncState.Complete: Fires after all SlidingSyncEvent.RoomData have been fired but before SlidingSyncEvent.List.
List: "SlidingSync.List"

This event fires whenever there has been a change to this list index. It fires exactly once per list, even if there were multiple operations for the list. It fires AFTER Lifecycle and RoomData events.

RoomData: "SlidingSync.RoomData"

This event fires when there are updates for a room. Fired as and when rooms are encountered in the response.