Skip to content
Snippets Groups Projects
Commit d608950b authored by Konstantinos Sideris's avatar Konstantinos Sideris
Browse files

Stop calling /messages if the prev_batch token is empty

parent e29fceae
No related branches found
No related tags found
No related merge requests found
......@@ -168,7 +168,7 @@ void
TimelineView::addBackwardsEvents(const mtx::responses::Messages &msgs)
{
// We've reached the start of the timline and there're no more messages.
if ((msgs.end == msgs.start) && msgs.chunk.size() == 0) {
if (msgs.end.empty() || ((msgs.end == msgs.start) && msgs.chunk.size() == 0)) {
isTimelineFinished = true;
return;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment