Richard van der Hoff
a493a0ddb3
Fix lint errors
2016-04-07 14:30:35 +01:00
Richard van der Hoff
7573171d05
Avoid paginating forever in private rooms
...
In TimelineWindow.paginate, keep a count of the number of API requests we have
made, and bail out if it gets too high, to ensure that we don't get stuck in a
loop of paginating right back to the start of the room.
2016-04-07 14:16:02 +01:00
Richard van der Hoff
c3ea913ae8
Try again if a pagination request gives us no new messages
...
This is basically a workaround for https://matrix.org/jira/browse/SYN-645 : if
we knew about all of the events already, we want to try again.
Fixes the second half of https://github.com/vector-im/vector-web/issues/1014
2016-03-14 14:47:29 +00:00
Richard van der Hoff
38e81ba61a
TimelineWindow.load: make the livetimeline case quicker
...
Avoid doing a loop round the reactor if we are just loading the live timeline.
2016-02-26 12:45:28 +00:00
Richard van der Hoff
a2185fefc1
Make sure we don't end up calling /messages in a loop if things go weird
...
If we somehow end up in a situation where calling /messages returns a load
of messages, but none of them are new, then currently we start calling
/messages again and again in a tight loop. This is bad, so fix it.
2016-02-03 11:47:04 +00:00
Richard van der Hoff
1499087098
TimelineWindow: fix canPaginate during load
...
We should return false rather than throw an exception if someone calls
canPaginate before the timeline finishes loading.
2016-01-30 00:09:12 +00:00
Richard van der Hoff
8db95f42fb
Add some unit tests for TimelineWindow.
2016-01-28 16:38:45 +00:00
Richard van der Hoff
b42e5d5fcf
Address review comments
...
Rearrange a couple of things for clarity, and add some comments.
2016-01-28 12:36:12 +00:00
Richard van der Hoff
b1e2090eef
TimelineWindow object
...
A handy thing for tracking a window into a room timeline
Could really do with some unit tests... sorry.
2016-01-27 09:53:15 +00:00