[gnome-software/gnome-3-22] Reset GsApp's progress to zero when recovering a non-transient state
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/gnome-3-22] Reset GsApp's progress to zero when recovering a non-transient state
- Date: Tue, 7 Mar 2017 16:32:03 +0000 (UTC)
commit d51d4f82942a3a664697156761a775747dceaf65
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 75dfcdb..d4a1027 100644
--- a/src/gs-app.c
+++ b/src/gs-app.c
@@ -742,6 +742,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]