summary refs log tree commit diff
path: root/src/timeline/TimelineView.cpp
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-08-31 09:57:04 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-08-31 09:57:04 +0300
commitd608950bea1cecb4a36b2ca3a07790a94139aa63 (patch)
treee59e54514c91cfbfabc6ba9119dcd3666b565619 /src/timeline/TimelineView.cpp
parentFix a use-after-free error during logout (diff)
downloadnheko-d608950bea1cecb4a36b2ca3a07790a94139aa63.tar.xz
Stop calling /messages if the prev_batch token is empty
Diffstat (limited to 'src/timeline/TimelineView.cpp')
-rw-r--r--src/timeline/TimelineView.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/timeline/TimelineView.cpp b/src/timeline/TimelineView.cpp
index e994409a..6eb553e8 100644
--- a/src/timeline/TimelineView.cpp
+++ b/src/timeline/TimelineView.cpp
@@ -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;
         }