mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-25 04:47:55 +00:00
1 parent
6181c9276a
commit
2be4dc11a0
4 files changed
+19
-1
No files matched your search
Vendored
+8
@@ -113,6 +113,14 @@ static const NSTimeInterval SUAutomaticUpdatePromptImpatienceTimer = 60 * 60 * 2
|
||||
}
|
||||
}
|
||||
|
||||
-(BOOL)resumeUpdateInteractively {
|
||||
if ([self isInterruptible]) {
|
||||
[self showUpdateAlert];
|
||||
return YES;
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (void)stopUpdatingOnTermination
|
||||
{
|
||||
if (self.willUpdateOnTermination)
|
||||
|
||||
Vendored
+2
-1
@@ -26,7 +26,8 @@ extern NSString *const SUUpdateDriverFinishedNotification;
|
||||
- (instancetype)initWithUpdater:(id<SUUpdaterPrivate>)updater;
|
||||
- (void)checkForUpdatesAtURL:(NSURL *)URL host:(SUHost *)host;
|
||||
- (void)abortUpdate;
|
||||
|
||||
/** If there is an update waiting to be installed, show UI indicating so. Return NO otherwise (e.g. if it's not supported). */
|
||||
- (BOOL)resumeUpdateInteractively;
|
||||
- (void)showAlert:(NSAlert *)alert;
|
||||
|
||||
@property (getter=isInterruptible, readonly) BOOL interruptible;
|
||||
|
||||
Vendored
+3
@@ -52,6 +52,9 @@ NSString *const SUUpdateDriverFinishedNotification = @"SUUpdateDriverFinished";
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:SUUpdateDriverFinishedNotification object:self];
|
||||
}
|
||||
|
||||
-(BOOL)resumeUpdateInteractively {
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (void)showAlert:(NSAlert *)alert {
|
||||
// Only UI-based subclass shows the actual alert
|
||||
|
||||
Vendored
+6
@@ -291,6 +291,9 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
|
||||
- (IBAction)checkForUpdates:(id)__unused sender
|
||||
{
|
||||
if (self.driver && [self.driver isInterruptible]) {
|
||||
if ([self.driver resumeUpdateInteractively]) {
|
||||
return;
|
||||
}
|
||||
[self.driver abortUpdate];
|
||||
}
|
||||
|
||||
@@ -305,6 +308,9 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
|
||||
- (void)installUpdatesIfAvailable
|
||||
{
|
||||
if (self.driver && [self.driver isInterruptible]) {
|
||||
if ([self.driver resumeUpdateInteractively]) {
|
||||
return;
|
||||
}
|
||||
[self.driver abortUpdate];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user