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
pull/1/head
Konstantinos Sideris 7 years ago
parent fdd5051dcf
commit 7e2f835eec
  1. 3
      src/timeline/TimelineView.cc

@ -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…
Cancel
Save