mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 19:08:58 +03:00
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
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue