mirror of
https://github.com/matrix-construct/construct
synced 2024-09-28 19:58:53 +02:00
modules/client/sync/rooms/timeline: Fix timeline limited flag condition; minor cleanup.
This commit is contained in:
parent
6fce2adc69
commit
e0cc786a9d
1 changed files with 5 additions and 5 deletions
|
@ -227,7 +227,7 @@ ircd::m::sync::room_timeline_polylog(data &data)
|
|||
|
||||
// events
|
||||
assert(data.room);
|
||||
bool limited{false}, ret{false};
|
||||
bool limited{true}, ret{false};
|
||||
m::event::id::buf prev
|
||||
{
|
||||
_room_timeline_polylog_events(data, *data.room, limited, ret)
|
||||
|
@ -288,15 +288,15 @@ ircd::m::sync::_room_timeline_polylog_events(data &data,
|
|||
continue;
|
||||
|
||||
if(event_idx < data.range.first)
|
||||
{
|
||||
limited = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if(limit > 1)
|
||||
prefetched += m::prefetch(event_idx);
|
||||
|
||||
prefetched += limit > 1 && m::prefetch(event_idx);
|
||||
++i;
|
||||
}
|
||||
|
||||
limited = i > limit;
|
||||
if(i > 1 && !it)
|
||||
it.seek(event_idx);
|
||||
|
||||
|
|
Loading…
Reference in a new issue