1
0
Fork 0
mirror of https://gitlab.com/niansa/qcommsy.git synced 2025-03-06 20:53:33 +01:00

Fixed maxposts

This commit is contained in:
niansa 2020-09-16 14:34:54 +02:00
parent 2b0a942557
commit 83b2ec15fa

View file

@ -360,7 +360,7 @@ libCommsy::libCommsy(const std::string& _server_url, const std::string& _server_
auto gumboPosts = get_posts(document->root);
if (gumboPosts.size() == 0) {
// Stop fetching more data
break;
return;
}
// Map posts and their corresponding URL to a number
@ -401,9 +401,9 @@ libCommsy::libCommsy(const std::string& _server_url, const std::string& _server_
// Get lastID
lastID = posts.back().id;
// Check if maximum amount of posts to load was exceeded
if (numposts == max_posts) {
if (numposts >= max_posts) {
// Stop loading more posts
break;
return;
}
}
}