[gnome-software/wip/kalev/gnome-3-22: 94/96] Unconditionally show things that are in progress in the Installed page



commit 430de64be34768d0403754344a35b898a8be8536
Author: Richard Hughes <richard hughsie com>
Date:   Tue Feb 28 09:15:36 2017 +0000

    Unconditionally show things that are in progress in the Installed page
    
    If we install a flatpakref from a remote without an AppStream branch and go
    'back' before it has finished installing, there's no way to get back to the
    installing details page.

 src/gs-plugin-loader.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index a65087a..2b86aa7 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -799,6 +799,17 @@ gs_plugin_loader_app_set_prio (GsApp *app, gpointer user_data)
 static gboolean
 gs_plugin_loader_app_is_valid_installed (GsApp *app, gpointer user_data)
 {
+       /* even without AppData, show things in progress */
+       switch (gs_app_get_state (app)) {
+       case AS_APP_STATE_INSTALLING:
+       case AS_APP_STATE_REMOVING:
+       case AS_APP_STATE_PURCHASING:
+               return TRUE;
+               break;
+       default:
+               break;
+       }
+
        switch (gs_app_get_kind (app)) {
        case AS_APP_KIND_OS_UPGRADE:
        case AS_APP_KIND_CODEC:


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