Stop calling /messages if the prev_batch token is empty

This commit is contained in:
Konstantinos Sideris 2018-08-31 09:57:04 +03:00
parent e29fceaee4
commit d608950bea
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}