Commit 11bfabfc authored by Dan Leinir Turthra Jensen's avatar Dan Leinir Turthra Jensen 🌈
Browse files

Ensure comments fetch for KNS starts on the right page

Summary:
For a while, we've not had reviews/comments showing up for KNS content,
and ensures we initiate fetching from the correct page. It does not,
however, ensure that the number of reviews is quite correct, as
we will need to add support for replies in some way (even if it's
only done as an indication that they exist)

Test Plan:
Without patch: Notice no reviews show up, except on very-reviewed items
With patch: Notice reviews show up on all content that says it has some

Reviewers: #discover_software_store, #plasma, ngraham, apol, starbuck

Reviewed By: #discover_software_store, ngraham

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D25282
parent a037f2cc
......@@ -67,7 +67,7 @@ Rating* KNSReviews::ratingForApplication(AbstractResource* app) const
void KNSReviews::fetchReviews(AbstractResource* app, int page)
{
Attica::ListJob< Attica::Comment >* job =
provider().requestComments(Attica::Comment::ContentComment, app->packageName(), QStringLiteral("0"), page, 10);
provider().requestComments(Attica::Comment::ContentComment, app->packageName(), QStringLiteral("0"), page - 1, 10);
if (!job) {
emit reviewsReady(app, {}, false);
return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment