[gnome-software] Reset GsApp's progress to zero when recovering a non-transient state



commit 176e09d4316c5e6a99c5ae1d6b3249501a6d2e8d
Author: Mario Sanchez Prada <mario endlessm com>
Date:   Mon Feb 13 14:50:26 2017 +0000

    Reset GsApp's progress to zero when recovering a non-transient state
    
    Make sure progress gets reset when recovering state, to prevent
    confusing initial states when going through more than one attempt.

 src/gs-app.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-app.c b/src/gs-app.c
index 9a09ec8..6201cc2 100644
--- a/src/gs-app.c
+++ b/src/gs-app.c
@@ -751,6 +751,10 @@ gs_app_set_state_recover (GsApp *app)
                 as_app_state_to_string (app->state),
                 as_app_state_to_string (app->state_recover));
 
+       /* make sure progress gets reset when recovering state, to prevent
+        * confusing initial states when going through more than one attempt */
+       gs_app_set_progress (app, 0);
+
        app->state = app->state_recover;
        gs_app_queue_notify (app, "state");
 }


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