Properly detect the start of the timeline
We can't rely solely on the number of the returned messages because it could be zero if all the event types are unknown. fixes #168
This commit is contained in:
parent
fdd5051dcf
commit
7e2f835eec
@ -153,7 +153,8 @@ TimelineView::addBackwardsEvents(const QString &room_id, const mtx::responses::M
|
||||
if (room_id_ != room_id)
|
||||
return;
|
||||
|
||||
if (msgs.chunk.size() == 0) {
|
||||
// We've reached the start of the timline and there're no more messages.
|
||||
if ((msgs.end == msgs.start) && msgs.chunk.size() == 0) {
|
||||
isTimelineFinished = true;
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user