Merge lp:~elachuni/software-center/relax-origin-distroseries into lp:software-center
Status: | Merged |
---|---|
Merged at revision: | 2675 |
Proposed branch: | lp:~elachuni/software-center/relax-origin-distroseries |
Merge into: | lp:software-center |
Diff against target: |
248 lines (+116/-24) 4 files modified
softwarecenter/backend/reviews/__init__.py (+5/-3) softwarecenter/backend/reviews/rnr.py (+22/-18) softwarecenter/ui/gtk3/views/appdetailsview.py (+31/-2) test/gtk3/test_appdetailsview.py (+58/-1) |
To merge this branch: | bzr merge lp:~elachuni/software-center/relax-origin-distroseries |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Vogt | Approve | ||
Review via email: mp+88942@code.launchpad.net |
Description of the change
Overview
========
This branch adds a 'relaxed' argument to all review loaders' get_reviews methods, to relax the origin and distroseries restriction.
Details
=======
If get_reviews() is called with relaxed=True, reviews are fetched with origin='any' and distroseries='any'.
With this branch in place, if the user selects "Any language" in the language drop down, the total number of reviews retrieved (if "Fetch more reviews" is clicked enough!) should always be equal to the total number reported by the ratings stats.
Reviews for the specific origin and distroseries will always be displayed first, and only then (if the user keeps requesting more reviews) the widget will retrieve and display reviews for other origins and distroseries.
Thanks, this looks very good, especially your use of the @patch decorator is inspiring and we should use it
more. About the test data factory, we don't have one currently but it would be good to add one.