[gnome-software] ubuntu-reviews: Disable ratings and reviews for flatpak and snap



commit cf57e25b085a6b4869c35dfdd3521e73d6b80d83
Author: Andrew Hayzen <ahayzen gmail com>
Date:   Sun Feb 4 21:16:25 2018 +0000

    ubuntu-reviews: Disable ratings and reviews for flatpak and snap
    
    Use AS_BUNDLE_KIND_PACKAGE to filter to debs

 plugins/ubuntu-reviews/gs-plugin-ubuntu-reviews.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/plugins/ubuntu-reviews/gs-plugin-ubuntu-reviews.c 
b/plugins/ubuntu-reviews/gs-plugin-ubuntu-reviews.c
index 1851248b..661ce1e9 100644
--- a/plugins/ubuntu-reviews/gs-plugin-ubuntu-reviews.c
+++ b/plugins/ubuntu-reviews/gs-plugin-ubuntu-reviews.c
@@ -740,6 +740,10 @@ gs_plugin_refine_app (GsPlugin *plugin,
                      GCancellable *cancellable,
                      GError **error)
 {
+       /* We only want reviews and ratings for debian packages */
+       if (gs_app_get_bundle_kind (app) != AS_BUNDLE_KIND_PACKAGE)
+               return TRUE;
+
        if ((flags & (GS_PLUGIN_REFINE_FLAGS_REQUIRE_RATING | GS_PLUGIN_REFINE_FLAGS_REQUIRE_REVIEW_RATINGS)) 
!= 0) {
                if (!refine_rating (plugin, app, cancellable, error))
                        return FALSE;


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