Make pagination logic slightly more robust

pull/564/head
Nicolas Werner 4 years ago
parent 32962a5616
commit dbf23fafbf
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
  1. 2
      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;

Loading…
Cancel
Save