From 49845d82460dcc5484922194cf601be7eeeb40f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kornel=20Lesin=CC=81ski?= Date: Tue, 3 Jan 2017 16:30:03 +0000 Subject: [PATCH] Re-init alert when called again A lazy way to bring it to front --- Sparkle/SUAutomaticUpdateDriver.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Sparkle/SUAutomaticUpdateDriver.m b/Sparkle/SUAutomaticUpdateDriver.m index ab825ffc..f5cb6047 100644 --- a/Sparkle/SUAutomaticUpdateDriver.m +++ b/Sparkle/SUAutomaticUpdateDriver.m @@ -50,6 +50,11 @@ static const NSTimeInterval SUAutomaticUpdatePromptImpatienceTimer = 60 * 60 * 2 { self.interruptible = NO; [self invalidateShowUpdateAlertTimer]; + + if (self.alert) { + [self.alert close]; + } + self.alert = [[SUAutomaticUpdateAlert alloc] initWithAppcastItem:self.updateItem host:self.host completionBlock:^(SUAutomaticInstallationChoice choice) { [self automaticUpdateAlertFinishedWithChoice:choice]; }];