mirror of
https://github.com/matrix-construct/construct
synced 2024-11-26 08:42:34 +01:00
modules/client/sync/rooms/timeline: Fix loop conditions.
This commit is contained in:
parent
5bf60df98b
commit
be2ae27af6
1 changed files with 7 additions and 4 deletions
|
@ -272,12 +272,15 @@ ircd::m::sync::_room_timeline_polylog_events(data &data,
|
|||
++i;
|
||||
}
|
||||
|
||||
limited = i >= limit;
|
||||
if(i > 0 && !it)
|
||||
limited = i > limit;
|
||||
if(i > 1 && !it)
|
||||
it.seek(event_idx);
|
||||
|
||||
if(i > 0)
|
||||
for(++it; it && i > -1; ++it, --i)
|
||||
if(i > 1 && it)
|
||||
--i, ++it;
|
||||
|
||||
if(i > 0 && it)
|
||||
for(++it; i > 0 && it; --i, ++it)
|
||||
{
|
||||
const m::event &event
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue