mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-29 05:24:26 +00:00
-automaticallyDownloadsUpdates should take account if developer disables automatic updates
This behavior is more consistent with the official branch.
This commit is contained in:
1 parent
35ec3caf55
commit
1d3e5753d3
2 files changed
+3
-8
No files matched your search
Vendored
+1
-1
@@ -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;
|
||||
|
||||
|
||||
Vendored
+2
-7
@@ -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
|
||||
|
||||
Reference in new issue
Block a user