Construct a new sliding list.
The range, sort and filter values to use for this list.
Return a copy of the list suitable for a request body.
True to forcibly include all params even if the list hasn't been modified. Callers may want to do this if they are modifying the list prior to calling updateList.
Check if a given index is within the list range. This is required even though the /sync API
provides explicit updates with index positions because of the following situation:
0 1 2 3 4 5 6 7 8 indexes
a b c d e f COMMANDS: SYNC 0 2 a b c; SYNC 6 8 d e f;
a b c d _ f COMMAND: DELETE 7;
e a b c d f COMMAND: INSERT 0 e;
c=3 is wrong as we are not tracking it, ergo we need to see if i
is in range else drop it
The index to check
True if the index is within a sliding window
Replace list parameters. All fields will be replaced with the new list parameters.
The new list parameters
Mark this list as modified or not. Modified lists will return sticky params with calls to getList. This is useful for the first time the list is sent, or if the list has changed in some way.
True to mark this list as modified so all sticky parameters will be re-sent.
Internal Class. SlidingList represents a single list in sliding sync. The list can have filters, multiple sliding windows, and maintains the index->room_id mapping.