-automaticallyDownloadsUpdates should take account if developer disables automatic updates

This behavior is more consistent with the official branch.
This commit is contained in:
Zorg committed 2016-08-16 19:43:56 -04:00
1 parent 35ec3caf55
commit 1d3e5753d3
2 files changed
+3 -8

No files matched your search

+1 -1
View File
@@ -88,7 +88,7 @@ SU_EXPORT @interface SPUUpdater : NSObject
/*!
* A property indicating whether or not updates can be automatically downloaded in the background.
*
* Note that the developer can disallow automatic downloading of updates.
* Note that the developer can disallow automatic downloading of updates from being enabled.
*/
@property (nonatomic) BOOL automaticallyDownloadsUpdates;
+2 -7
View File
@@ -420,7 +420,7 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
}
id <SUUpdateDriver> updateDriver;
if (!installerIsRunning && [strongSelf automaticallyDownloadsUpdates] && [strongSelf allowsAutomaticUpdates] && strongSelf.resumableUpdate == nil) {
if (!installerIsRunning && [strongSelf automaticallyDownloadsUpdates] && strongSelf.resumableUpdate == nil) {
updateDriver =
[[SUAutomaticUpdateDriver alloc]
initWithHost:strongSelf.host
@@ -614,12 +614,7 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
- (BOOL)automaticallyDownloadsUpdates
{
return [self.updaterSettings automaticallyDownloadsUpdates];
}
- (BOOL)allowsAutomaticUpdates
{
return [self.updaterSettings allowsAutomaticUpdates];
return [self.updaterSettings allowsAutomaticUpdates] && [self.updaterSettings automaticallyDownloadsUpdates];
}
- (void)setFeedURL:(NSURL *)feedURL