Fix the default updates feed URL setting, and override the current setting if it matches the former default
parent
64149aa8c5
commit
591730eea3
|
@ -478,7 +478,9 @@ increase/decrease as long as the user holds the left/right, plus/minus button */
|
|||
[userDefaultsValuesDict setObject:[NSNumber numberWithBool:YES] forKey:@"remoteEnabled"];
|
||||
[userDefaultsValuesDict setObject:[NSNumber numberWithBool:YES] forKey:@"remoteOnlyOnActive"];
|
||||
|
||||
[userDefaultsValuesDict setObject:@"https://kode54.net/cog/stable.xml" forKey:@"SUFeedURL"];
|
||||
NSString * feedURLdefault = @"https://kode54.net/cog/mercury.xml";
|
||||
NSString * feedURLbroken = @"https://kode54.net/cog/stable.xml";
|
||||
[userDefaultsValuesDict setObject:feedURLdefault forKey:@"SUFeedURL"];
|
||||
|
||||
|
||||
[userDefaultsValuesDict setObject:@"clearAndPlay" forKey:@"openingFilesBehavior"];
|
||||
|
@ -493,6 +495,10 @@ increase/decrease as long as the user holds the left/right, plus/minus button */
|
|||
//Register and sync defaults
|
||||
[[NSUserDefaults standardUserDefaults] registerDefaults:userDefaultsValuesDict];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
|
||||
//And if the existing feed URL is broken due to my ineptitude with the above defaults, fix it
|
||||
if ([[[NSUserDefaults standardUserDefaults] stringForKey:@"SUFeedURL"] isEqualToString:feedURLbroken])
|
||||
[[NSUserDefaults standardUserDefaults] setValue:feedURLdefault forKey:@"SUFeedURL"];
|
||||
|
||||
//Add observers
|
||||
[[NSUserDefaultsController sharedUserDefaultsController] addObserver:self forKeyPath:@"values.hotKeyPlayKeyCode" options:0 context:nil];
|
||||
|
|
Loading…
Reference in New Issue