Fix pagination after timeline clear

This commit is contained in:
Nicolas Werner 2023-01-02 04:21:26 +01:00
parent 6176ce7c2b
commit 5f315d8a3c
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
2 changed files with 8 additions and 1 deletions

View file

@ -975,6 +975,9 @@ TimelineModel::addEvents(const mtx::responses::Timeline &timeline)
if (timeline.events.empty()) if (timeline.events.empty())
return; return;
if (timeline.limited)
setPaginationInProgress(false);
events.handleSync(timeline); events.handleSync(timeline);
using namespace mtx::events; using namespace mtx::events;

View file

@ -398,7 +398,11 @@ public slots:
void setThread(const QString &newThread); void setThread(const QString &newThread);
void resetThread(); void resetThread();
void setDecryptDescription(bool decrypt) { decryptDescription = decrypt; } void setDecryptDescription(bool decrypt) { decryptDescription = decrypt; }
void clearTimeline() { events.clearTimeline(); } void clearTimeline()
{
events.clearTimeline();
setPaginationInProgress(false);
}
void resetState(); void resetState();
void receivedSessionKey(const std::string &session_key) void receivedSessionKey(const std::string &session_key)
{ {