mirror of
https://gitlab.com/niansa/qcommsy.git
synced 2025-03-06 20:53:33 +01:00
Fixed maxposts
This commit is contained in:
parent
2b0a942557
commit
83b2ec15fa
1 changed files with 3 additions and 3 deletions
|
@ -360,7 +360,7 @@ libCommsy::libCommsy(const std::string& _server_url, const std::string& _server_
|
||||||
auto gumboPosts = get_posts(document->root);
|
auto gumboPosts = get_posts(document->root);
|
||||||
if (gumboPosts.size() == 0) {
|
if (gumboPosts.size() == 0) {
|
||||||
// Stop fetching more data
|
// Stop fetching more data
|
||||||
break;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Map posts and their corresponding URL to a number
|
// 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
|
// Get lastID
|
||||||
lastID = posts.back().id;
|
lastID = posts.back().id;
|
||||||
// Check if maximum amount of posts to load was exceeded
|
// Check if maximum amount of posts to load was exceeded
|
||||||
if (numposts == max_posts) {
|
if (numposts >= max_posts) {
|
||||||
// Stop loading more posts
|
// Stop loading more posts
|
||||||
break;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue