Add -updaterShouldDownloadReleaseNotes: delegate method

This commit is contained in:
Zorg committed 2016-05-28 10:13:18 -04:00
1 parent 7bfccc3898
commit 0cf1aee693
3 files changed
+18 -1

No files matched your search

+2 -1
View File
@@ -86,7 +86,8 @@
});
}];
if (updateItem.releaseNotesURL != nil) {
id <SUUpdaterDelegate> updaterDelegate = self.updaterDelegate;
if (updateItem.releaseNotesURL != nil && (![updaterDelegate respondsToSelector:@selector(updaterShouldDownloadReleaseNotes:)] || [updaterDelegate updaterShouldDownloadReleaseNotes:self.updater])) {
NSURLRequest *request = [NSURLRequest requestWithURL:updateItem.releaseNotesURL cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:30];
id <SUUserDriver> userDriver = self.userDriver;
+11
View File
@@ -114,6 +114,17 @@ SU_EXPORT extern NSString *const SUUpdaterAppcastNotificationKey;
*/
- (void)updaterDidNotFindUpdate:(SUUpdater *)updater;
/*!
Returns whether the release notes (if available) should be downloaded after an update is found and shown.
This is specifically for the releaseNotesLink element in the appcast.
\param updater The SUUpdater instance.
\return \c YES to download and show the release notes if available
*/
- (BOOL)updaterShouldDownloadReleaseNotes:(SUUpdater *)updater;
/*!
Called immediately before downloading the specified update.
+5
View File
@@ -98,6 +98,11 @@
return self.applicationBundlePath;
}
- (BOOL)updaterShouldDownloadReleaseNotes:(SUUpdater *)__unused updater
{
return self.verbose;
}
- (void)startUpdater
{
NSError *updaterError = nil;