mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Make pagination logic slightly more robust
This commit is contained in:
parent
32962a5616
commit
dbf23fafbf
1 changed files with 1 additions and 1 deletions
|
@ -61,7 +61,7 @@ EventStore::EventStore(std::string room_id, QObject *)
|
||||||
&EventStore::oldMessagesRetrieved,
|
&EventStore::oldMessagesRetrieved,
|
||||||
this,
|
this,
|
||||||
[this](const mtx::responses::Messages &res) {
|
[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;
|
noMoreMessages = true;
|
||||||
emit fetchedMore();
|
emit fetchedMore();
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue