From 6cead6bce881ce7bcc6878852f292de8050e20e6 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Mon, 9 Nov 2026 19:11:29 +0100 Subject: Remove the global bar when the restore ends (success or failure) --- src/common.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/common.c') diff --git a/src/common.c b/src/common.c index 60b1a49..bd06691 100644 --- a/src/common.c +++ b/src/common.c @@ -843,10 +843,18 @@ static const char* restore_step_label(int step) } } -void idevicerestore_progress(struct idevicerestore_client_t* client, int step, double progress) +static int last_global_step = -1; + +void idevicerestore_progress_finish(void) { - static int last_global_step = -1; + if (last_global_step != -1) { + finalize_progress(GLOBAL_PROGRESS_TAG); + last_global_step = -1; + } +} +void idevicerestore_progress(struct idevicerestore_client_t* client, int step, double progress) +{ if (client && client->progress_cb) { client->progress_cb(step, progress, client->progress_cb_data); return; -- cgit v1.1-32-gdbae