[gnome-software] trivial: Invalidate less applications when refreshing the updates list



commit ec17c1b8bf15a3a500da1b1036bb00f0fb3d66f9
Author: Richard Hughes <richard hughsie com>
Date:   Mon Sep 28 12:27:13 2015 +0100

    trivial: Invalidate less applications when refreshing the updates list
    
    We only need to re-resolve() the installed and updatable applications; local
    applications are still going to be local after this event.

 src/gs-plugin-loader.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index 6c32321..fb359de 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -2694,7 +2694,14 @@ gs_plugin_loader_updates_changed_delay_cb (gpointer user_data)
        apps = g_hash_table_get_values (priv->app_cache);
        for (l = apps; l != NULL; l = l->next) {
                app = GS_APP (l->data);
-               gs_app_set_state (app, AS_APP_STATE_UNKNOWN);
+               switch (gs_app_get_state (app)) {
+               case AS_APP_STATE_INSTALLED:
+               case AS_APP_STATE_UPDATABLE:
+                       gs_app_set_state (app, AS_APP_STATE_UNKNOWN);
+                       break;
+               default:
+                       break;
+               }
        }
        g_list_free (apps);
 


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