Fix endless pagination, when old history is inaccessible

This commit is contained in:
Nicolas Werner 2020-09-02 19:38:07 +02:00
parent eb554e8266
commit 8d14a058c6
1 changed files with 1 additions and 1 deletions

View File

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