add delegate userDidSkipThisVersion (#1409)

add delegate userDidSkipThisVersion
This commit is contained in:
Kornel authored and GitHub committed 2019-08-14 09:40:01 +01:00
commit 2b54753090
2 files changed
+11

No files matched your search

+4
View File
@@ -165,6 +165,7 @@
{
self.updateAlert = nil;
[self.host setObject:nil forUserDefaultsKey:SUSkippedVersionKey];
id<SUUpdaterPrivate> updater = self.updater;
switch (choice) {
case SUInstallUpdateChoice:
[self didDismissAlertPermanently:NO forItem:item];
@@ -178,6 +179,9 @@
break;
case SUSkipThisVersionChoice:
if ([[updater delegate] respondsToSelector:@selector(userDidSkipThisVersion:)]) {
[[updater delegate] updater:self.updater userDidSkipThisVersion:self.updateItem];
}
[self didDismissAlertPermanently:YES forItem:item];
[self.host setObject:[self.updateItem versionString] forUserDefaultsKey:SUSkippedVersionKey];
[self abortUpdate];
+7
View File
@@ -141,6 +141,13 @@ SU_EXPORT extern NSString *const SUUpdaterAppcastNotificationKey;
*/
- (void)updaterDidNotFindUpdate:(SUUpdater *)updater;
/*!
Called when the user clicks the Skip This Version button.
\param updater The SUUpdater instance.
*/
- (void)userDidSkipThisVersion:(SUUpdater *)updater;
/*!
Called immediately before downloading the specified update.