diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-01-02 04:21:26 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-01-02 04:21:26 +0100 |
commit | 5f315d8a3cadd8f94b3701e1174b735f09b8c0b7 (patch) | |
tree | f00f19701e68a24fafbbd461eb7134f81b63e657 /src | |
parent | Limit build jobs on small systems (diff) | |
download | nheko-5f315d8a3cadd8f94b3701e1174b735f09b8c0b7.tar.xz |
Fix pagination after timeline clear
Diffstat (limited to 'src')
-rw-r--r-- | src/timeline/TimelineModel.cpp | 3 | ||||
-rw-r--r-- | src/timeline/TimelineModel.h | 6 |
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) { |