From dbf23fafbfe0e6ba4f49ee447d481e2c9aa49985 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Thu, 29 Apr 2021 10:23:50 +0200 Subject: [PATCH] Make pagination logic slightly more robust --- src/timeline/EventStore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/timeline/EventStore.cpp b/src/timeline/EventStore.cpp index 6104ad00..883d384c 100644 --- a/src/timeline/EventStore.cpp +++ b/src/timeline/EventStore.cpp @@ -61,7 +61,7 @@ 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 (res.end.empty() || cache::client()->previousBatchToken(room_id_) == res.end) { noMoreMessages = true; emit fetchedMore(); return;