[gnome-software] trivial: Fix up the GET_RECENT sorting function



commit c68ddcc88f8849a23faa743e40487da98a2021d7
Author: Richard Hughes <richard hughsie com>
Date:   Fri May 19 20:20:13 2017 +0100

    trivial: Fix up the GET_RECENT sorting function
    
    We always want DESKTOP applications listed first.

 lib/gs-plugin-loader.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index 7e1530d..2fa8471 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -1280,9 +1280,9 @@ gs_plugin_loader_featured_debug (GsApp *app, gpointer user_data)
 static gint
 gs_plugin_loader_app_sort_kind_cb (GsApp *app1, GsApp *app2, gpointer user_data)
 {
-       if (gs_app_get_kind (app1) > gs_app_get_kind (app2))
+       if (gs_app_get_kind (app1) == AS_APP_KIND_DESKTOP)
                return -1;
-       if (gs_app_get_kind (app1) < gs_app_get_kind (app2))
+       if (gs_app_get_kind (app2) == AS_APP_KIND_DESKTOP)
                return 1;
        return 0;
 }


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