From c060a136a971cc3251b7766bb353bbe3b1d601e8 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Sat, 13 May 2017 19:58:48 +0300 Subject: Update prev_batch only while paginating --- src/TimelineView.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/TimelineView.cc') 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); -- cgit 1.5.1