[gnome-software] trivial: Get the user_key from ummy reviews



commit 15dfefd5653a71d9f80c78124f3a95ed229918d7
Author: Richard Hughes <richard hughsie com>
Date:   Wed Feb 10 17:04:41 2016 +0000

    trivial: Get the user_key from ummy reviews

 src/plugins/gs-plugin-xdg-app-reviews.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/plugins/gs-plugin-xdg-app-reviews.c b/src/plugins/gs-plugin-xdg-app-reviews.c
index d4fcfaa..c9e9afb 100644
--- a/src/plugins/gs-plugin-xdg-app-reviews.c
+++ b/src/plugins/gs-plugin-xdg-app-reviews.c
@@ -684,12 +684,6 @@ gs_plugin_refine_reviews (GsPlugin *plugin,
        for (i = 0; i < reviews->len; i++) {
                review = g_ptr_array_index (reviews, i);
 
-               /* ignore invalid reviews */
-               if (gs_review_get_rating (review) == 0)
-                       continue;
-               if (gs_review_get_reviewer (review) == NULL)
-                       continue;
-
                /* save this on the application object so we can use it for
                 * submitting a new review */
                if (i == 0) {
@@ -697,6 +691,12 @@ gs_plugin_refine_reviews (GsPlugin *plugin,
                                             gs_review_get_metadata_item (review, "user_skey"));
                }
 
+               /* ignore invalid reviews */
+               if (gs_review_get_rating (review) == 0)
+                       continue;
+               if (gs_review_get_reviewer (review) == NULL)
+                       continue;
+
                /* the user_hash matches, so mark this as our own review */
                if (g_strcmp0 (gs_review_get_metadata_item (review, "user_hash"),
                               plugin->priv->user_hash) == 0) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]