[gnome-software] Only get the runtime when viewing application details



commit c5fdfbf85abca14cb7ca19160018760acd8ac801
Author: Richard Hughes <richard hughsie com>
Date:   Wed Feb 17 11:37:07 2016 +0000

    Only get the runtime when viewing application details
    
    This requires network IO and is thus slow.

 src/plugins/gs-plugin-xdg-app.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/plugins/gs-plugin-xdg-app.c b/src/plugins/gs-plugin-xdg-app.c
index 6991792..f0c8bb5 100644
--- a/src/plugins/gs-plugin-xdg-app.c
+++ b/src/plugins/gs-plugin-xdg-app.c
@@ -1000,6 +1000,10 @@ gs_plugin_refine_item_size (GsPlugin *plugin,
        if (!gs_plugin_refine_item_commit (plugin, app, cancellable, error))
                return FALSE;
 
+       /* need runtime */
+       if (!gs_plugin_refine_item_runtime (plugin, app, cancellable, error))
+               return FALSE;
+
        /* calculate the platform size too if the app is not installed */
        if (gs_app_get_state (app) == AS_APP_STATE_AVAILABLE &&
            gs_app_get_xdgapp_kind (app) == XDG_APP_REF_KIND_APP) {
@@ -1108,12 +1112,6 @@ gs_plugin_refine_item (GsPlugin *plugin,
                        return FALSE;
        }
 
-       /* runtime */
-       if (flags & GS_PLUGIN_REFINE_FLAGS_REQUIRE_SETUP_ACTION) {
-               if (!gs_plugin_refine_item_runtime (plugin, app, cancellable, error))
-                       return FALSE;
-       }
-
        return TRUE;
 }
 


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