summary refs log tree commit diff
path: root/src/timeline/EventStore.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2020-10-23 19:42:12 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2020-10-23 19:42:23 +0200
commit4797b9fa9651c2bb5a35ca67497c2f0eb4956820 (patch)
treec25af0ef6625dc99cd04a7b564743d5a97edefcd /src/timeline/EventStore.cpp
parentFix share keys setting not working (diff)
downloadnheko-4797b9fa9651c2bb5a35ca67497c2f0eb4956820.tar.xz
Fix infinite pagination properly now.
Diffstat (limited to 'src/timeline/EventStore.cpp')
-rw-r--r--src/timeline/EventStore.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/timeline/EventStore.cpp b/src/timeline/EventStore.cpp

index 22809a20..38292f49 100644 --- a/src/timeline/EventStore.cpp +++ b/src/timeline/EventStore.cpp
@@ -54,8 +54,11 @@ EventStore::EventStore(std::string room_id, QObject *) &EventStore::oldMessagesRetrieved, this, [this](const mtx::responses::Messages &res) { - if (cache::client()->previousBatchToken(room_id_) == res.end) + if (cache::client()->previousBatchToken(room_id_) == res.end) { noMoreMessages = true; + emit fetchedMore(); + return; + } uint64_t newFirst = cache::client()->saveOldMessages(room_id_, res); if (newFirst == first)