mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-26 04:57:54 +00:00
Add updater:shouldPostponeRelaunchForUpdate: 1.x stub
This commit is contained in:
1 parent
59326e80d4
commit
ea472ae3f0
2 files changed
+18
No files matched your search
Vendored
+3
@@ -405,6 +405,9 @@ static NSMutableDictionary *sharedUpdaters = nil;
|
||||
self.postponedInstallHandler = installHandler;
|
||||
|
||||
shouldPostponeRelaunch = [self.delegate updater:self shouldPostponeRelaunchForUpdate:item untilInvoking:invocation];
|
||||
} else if ([self.delegate respondsToSelector:@selector(updater:shouldPostponeRelaunchForUpdate:)]) {
|
||||
// This API should really take a block, but not fixing a 1.x mishap now
|
||||
shouldPostponeRelaunch = [self.delegate updater:self shouldPostponeRelaunchForUpdate:item];
|
||||
}
|
||||
|
||||
return shouldPostponeRelaunch;
|
||||
|
||||
Vendored
+15
@@ -208,6 +208,21 @@ __deprecated_msg("See SPUUpdaterDelegate instead")
|
||||
*/
|
||||
- (BOOL)updater:(SUUpdater *)updater shouldPostponeRelaunchForUpdate:(SUAppcastItem *)item untilInvoking:(NSInvocation *)invocation;
|
||||
|
||||
/*!
|
||||
Returns whether the relaunch should be delayed in order to perform other tasks.
|
||||
|
||||
This is not called if the user didn't relaunch on the previous update,
|
||||
in that case it will immediately restart.
|
||||
|
||||
This method acts as a simpler alternative to SUUpdaterDelegate::updater:shouldPostponeRelaunchForUpdate:untilInvoking: avoiding usage of NSInvocation, which is not available in Swift environments.
|
||||
|
||||
\param updater The SUUpdater instance.
|
||||
\param item The appcast item corresponding to the update that is proposed to be installed.
|
||||
|
||||
\return \c YES to delay the relaunch.
|
||||
*/
|
||||
- (BOOL)updater:(SUUpdater *)updater shouldPostponeRelaunchForUpdate:(SUAppcastItem *)item;
|
||||
|
||||
/*!
|
||||
Returns whether the application should be relaunched at all.
|
||||
|
||||
|
||||
Reference in new issue
Block a user