Fix software update logic

It would previously not ask to update (but go directly to download) when doing a manual update check.
This commit is contained in:
Allan Odgaard
2012-12-24 14:09:41 +01:00
parent ddd9763a79
commit 09abc8eede

View File

@@ -173,7 +173,7 @@ static SoftwareUpdate* SharedInstance;
}
else if(info.version > thisVersion)
{
if(!backgroundFlag && [[NSUserDefaults standardUserDefaults] boolForKey:kUserDefaultsAskBeforeUpdatingKey])
if(!backgroundFlag || [[NSUserDefaults standardUserDefaults] boolForKey:kUserDefaultsAskBeforeUpdatingKey])
{
NSInteger choice = NSRunInformationalAlertPanel(@"New Version Available", @"%@ %ld is now available—you have %ld. Would you like to download it now?", @"Download & Install", nil, @"Later", appName, info.version, thisVersion);
if(choice == NSAlertDefaultReturn) // “Download & Install”