diff options
author | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-05-13 19:58:48 +0300 |
---|---|---|
committer | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-05-13 19:58:48 +0300 |
commit | c060a136a971cc3251b7766bb353bbe3b1d601e8 (patch) | |
tree | 6d580d7af59bdeef1037d83216fa71788422468c /src/TimelineView.cc | |
parent | Initial support for backwards pagination (diff) | |
download | nheko-c060a136a971cc3251b7766bb353bbe3b1d601e8.tar.xz |
Update prev_batch only while paginating
Diffstat (limited to 'src/TimelineView.cc')
-rw-r--r-- | src/TimelineView.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/TimelineView.cc b/src/TimelineView.cc index 9f80db66..aec519ed 100644 --- a/src/TimelineView.cc +++ b/src/TimelineView.cc @@ -219,7 +219,10 @@ int TimelineView::addEvents(const Timeline &timeline) { int message_count = 0; - prev_batch_token_ = timeline.previousBatch(); + if (isInitialSync) { + prev_batch_token_ = timeline.previousBatch(); + isInitialSync = false; + } for (const auto &event : timeline.events()) { TimelineItem *item = parseMessageEvent(event.toObject(), TimelineDirection::Bottom); |