mirror of
https://github.com/matrix-construct/construct
synced 2024-11-16 15:00:51 +01: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
|
// events
|
||||||
assert(data.room);
|
assert(data.room);
|
||||||
bool limited{false}, ret{false};
|
bool limited{true}, ret{false};
|
||||||
m::event::id::buf prev
|
m::event::id::buf prev
|
||||||
{
|
{
|
||||||
_room_timeline_polylog_events(data, *data.room, limited, ret)
|
_room_timeline_polylog_events(data, *data.room, limited, ret)
|
||||||
|
@ -288,15 +288,15 @@ ircd::m::sync::_room_timeline_polylog_events(data &data,
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(event_idx < data.range.first)
|
if(event_idx < data.range.first)
|
||||||
|
{
|
||||||
|
limited = false;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if(limit > 1)
|
prefetched += limit > 1 && m::prefetch(event_idx);
|
||||||
prefetched += m::prefetch(event_idx);
|
|
||||||
|
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
|
||||||
limited = i > limit;
|
|
||||||
if(i > 1 && !it)
|
if(i > 1 && !it)
|
||||||
it.seek(event_idx);
|
it.seek(event_idx);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue