summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2023-01-02 04:21:26 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2023-01-02 04:21:26 +0100
commit5f315d8a3cadd8f94b3701e1174b735f09b8c0b7 (patch)
treef00f19701e68a24fafbbd461eb7134f81b63e657 /src
parentLimit build jobs on small systems (diff)
downloadnheko-5f315d8a3cadd8f94b3701e1174b735f09b8c0b7.tar.xz
Fix pagination after timeline clear
Diffstat (limited to 'src')
-rw-r--r--src/timeline/TimelineModel.cpp3
-rw-r--r--src/timeline/TimelineModel.h6
2 files changed, 8 insertions, 1 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp
index b9725ecc..f3d92e31 100644
--- a/src/timeline/TimelineModel.cpp
+++ b/src/timeline/TimelineModel.cpp
@@ -975,6 +975,9 @@ TimelineModel::addEvents(const mtx::responses::Timeline &timeline)
     if (timeline.events.empty())
         return;
 
+    if (timeline.limited)
+        setPaginationInProgress(false);
+
     events.handleSync(timeline);
 
     using namespace mtx::events;
diff --git a/src/timeline/TimelineModel.h b/src/timeline/TimelineModel.h
index 01d80797..59ad1b37 100644
--- a/src/timeline/TimelineModel.h
+++ b/src/timeline/TimelineModel.h
@@ -398,7 +398,11 @@ public slots:
     void setThread(const QString &newThread);
     void resetThread();
     void setDecryptDescription(bool decrypt) { decryptDescription = decrypt; }
-    void clearTimeline() { events.clearTimeline(); }
+    void clearTimeline()
+    {
+        events.clearTimeline();
+        setPaginationInProgress(false);
+    }
     void resetState();
     void receivedSessionKey(const std::string &session_key)
     {