mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-29 05:24:26 +00:00
Fixing bug 228469:
Now if the developer sets a value for SUEnableAutomaticChecks in Info.plist, we assume that's a good default value to take, and we don't ask the user what he wants to do on startup. If he doesn't specify any preference of his own, we take the Info.plist value to be the canonical one.
This commit is contained in:
1 parent
de7db2d716
commit
6f3d124868
1 file changed
+7
-3
+7
-3
@@ -53,8 +53,9 @@ static SUUpdater *sharedUpdater = nil;
|
||||
if ([[SUUserDefaults standardUserDefaults] objectForKey:SUEnableAutomaticChecksKey] &&
|
||||
[[SUUserDefaults standardUserDefaults] boolForKey:SUEnableAutomaticChecksKey] == NO) { return; }
|
||||
|
||||
// Has he been asked already?
|
||||
if ([[SUUserDefaults standardUserDefaults] objectForKey:SUEnableAutomaticChecksKey] == nil)
|
||||
// Has he been asked already? And don't ask if the host has a default value set in its Info.plist.
|
||||
if ([[SUUserDefaults standardUserDefaults] objectForKey:SUEnableAutomaticChecksKey] == nil &&
|
||||
[hostBundle objectForInfoDictionaryKey:SUEnableAutomaticChecksKey] == nil)
|
||||
{
|
||||
if ([[SUUserDefaults standardUserDefaults] objectForKey:SUEnableAutomaticChecksKeyOld])
|
||||
[[SUUserDefaults standardUserDefaults] setBool:[[SUUserDefaults standardUserDefaults] boolForKey:SUEnableAutomaticChecksKeyOld] forKey:SUEnableAutomaticChecksKey];
|
||||
@@ -66,7 +67,10 @@ static SUUpdater *sharedUpdater = nil;
|
||||
[SUUpdatePermissionPrompt promptWithHostBundle:hostBundle delegate:self];
|
||||
}
|
||||
|
||||
if ([[SUUserDefaults standardUserDefaults] boolForKey:SUEnableAutomaticChecksKey] == YES)
|
||||
// We check if the user's said they want updates, or they haven't said anything, and the default is set to checking.
|
||||
if ([[SUUserDefaults standardUserDefaults] boolForKey:SUEnableAutomaticChecksKey] == YES ||
|
||||
([[SUUserDefaults standardUserDefaults] objectForKey:SUEnableAutomaticChecksKey] == nil &&
|
||||
[[hostBundle objectForInfoDictionaryKey:SUEnableAutomaticChecksKey] boolValue] == YES))
|
||||
[self beginUpdateCycle];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user