Fix Duplicate fetched chunk
This commit is contained in:
parent
34ffe054cf
commit
14f8f4d61b
@ -131,7 +131,6 @@ void
|
|||||||
RoomDirectoryModel::fetchMore(const QModelIndex &)
|
RoomDirectoryModel::fetchMore(const QModelIndex &)
|
||||||
{
|
{
|
||||||
nhlog::net()->debug("Fetching more rooms from mtxclient...");
|
nhlog::net()->debug("Fetching more rooms from mtxclient...");
|
||||||
nhlog::net()->debug("Prev batch: {} | Next batch: {}", prevBatch_, nextBatch_);
|
|
||||||
|
|
||||||
mtx::requests::PublicRooms req;
|
mtx::requests::PublicRooms req;
|
||||||
req.limit = limit_;
|
req.limit = limit_;
|
||||||
@ -183,5 +182,5 @@ RoomDirectoryModel::displayRooms(std::vector<mtx::responses::PublicRoomsChunk> f
|
|||||||
canFetchMore_ = false;
|
canFetchMore_ = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
prevBatch_ = std::exchange(nextBatch_, next_batch);
|
prevBatch_ = next_batch;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user