diff options
author | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2018-08-31 09:57:04 +0300 |
---|---|---|
committer | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2018-08-31 09:57:04 +0300 |
commit | d608950bea1cecb4a36b2ca3a07790a94139aa63 (patch) | |
tree | e59e54514c91cfbfabc6ba9119dcd3666b565619 /src/timeline/TimelineView.cpp | |
parent | Fix a use-after-free error during logout (diff) | |
download | nheko-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.cpp | 2 |
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; } |