From acd22dda12a3cbdc3bf9362db7e00c1b3113d725 Mon Sep 17 00:00:00 2001 From: Zorg Date: Fri, 19 Feb 2021 20:38:47 -0800 Subject: [PATCH] Undo removing progress change --- Sparkle/Autoupdate/Autoupdate.m | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/Sparkle/Autoupdate/Autoupdate.m b/Sparkle/Autoupdate/Autoupdate.m index 63f1af28..92c38e6b 100644 --- a/Sparkle/Autoupdate/Autoupdate.m +++ b/Sparkle/Autoupdate/Autoupdate.m @@ -136,7 +136,7 @@ static const NSTimeInterval SUTerminationTimeDelay = 0.5; self.statusController = [[SUStatusController alloc] initWithHost:host]; [self.statusController setButtonTitle:SULocalizedString(@"Cancel Update", @"") target:nil action:Nil isDefault:NO]; [self.statusController beginActionWithTitle:SULocalizedString(@"Installing update...", @"") - maxProgressValue:0 statusText: @""]; + maxProgressValue:100 statusText: @""]; [self.statusController showWindow:self]; } @@ -151,13 +151,10 @@ static const NSTimeInterval SUTerminationTimeDelay = 0.5; return; } - void(^progressBlock)(double) = ^(double __unused progress){ - // Showing determinate progress doesn't work anymore and may be fragile to support, so disabling it and using intermediate progress bar with maxProgressValue as 0 - // instead of 100 above in beginActionWithTitle:maxProgressValue:statusText: call - - //dispatch_async(dispatch_get_main_queue(), ^(){ - // self.statusController.progressValue = progress * 100.0; - //}); + void(^progressBlock)(double) = ^(double progress){ + dispatch_async(dispatch_get_main_queue(), ^(){ + self.statusController.progressValue = progress * 100.0; + }); }; NSError *finalInstallationError = nil;