Fix infinite pagination properly now.
This commit is contained in:
parent
1ab20e0ee3
commit
4797b9fa96
4 changed files with 19 additions and 5 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue