[gnome-software/gnome-3-20] Do not clear the recovery state when using gs_app_set_state_recover()



commit e1748a5691e0bd97f193eae0858020bf8d436d60
Author: Richard Hughes <richard hughsie com>
Date:   Fri Apr 22 13:06:36 2016 +0100

    Do not clear the recovery state when using gs_app_set_state_recover()
    
    If we do AVAILABLE->INSTALLING then recover (which puts us back at AVAILABLE)
    then we do AVAILABLE->INSTALLING then recover we want to stay at AVAILABLE
    rather than be at the new state of UNKNOWN.

 src/gs-app.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/gs-app.c b/src/gs-app.c
index 1783da9..6effba8 100644
--- a/src/gs-app.c
+++ b/src/gs-app.c
@@ -452,8 +452,13 @@ gs_app_set_state_recover (GsApp *app)
                return;
        if (app->state_recover == app->state)
                return;
+
+       g_debug ("recovering state on %s from %s to %s",
+                app->id,
+                as_app_state_to_string (app->state),
+                as_app_state_to_string (app->state_recover));
+
        app->state = app->state_recover;
-       app->state_recover = AS_APP_STATE_UNKNOWN;
        gs_app_queue_notify (app, "state");
 }
 


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