Fix endless pagination, when old history is inaccessible

pull/275/head
Nicolas Werner 4 years ago
parent eb554e8266
commit 8d14a058c6
  1. 2
      src/timeline/EventStore.cpp

@ -55,7 +55,7 @@ EventStore::EventStore(std::string room_id, QObject *)
[this](const mtx::responses::Messages &res) { [this](const mtx::responses::Messages &res) {
// //
uint64_t newFirst = cache::client()->saveOldMessages(room_id_, res); uint64_t newFirst = cache::client()->saveOldMessages(room_id_, res);
if (newFirst == first) if (newFirst == first && !res.chunk.empty())
fetchMore(); fetchMore();
else { else {
emit beginInsertRows(toExternalIdx(newFirst), emit beginInsertRows(toExternalIdx(newFirst),

Loading…
Cancel
Save