Commit f82802c0 authored by Carola Nitz's avatar Carola Nitz

NSUserDefaults: remove synchronized since it's outdated

from the NSUserdefaults.h :
 -synchronize is deprecated and will be marked with the NS_DEPRECATED macro in a future release.
parent 79fb6edf
......@@ -52,7 +52,6 @@
selectedLocale = @"eng";
}
[defaults setObject:selectedLocale forKey:kVLCSettingLastUsedSubtitlesSearchLanguage];
[defaults synchronize];
}
_osoFetcher.subtitleLanguageId = selectedLocale;
......@@ -204,7 +203,6 @@
handler:^(UIAlertAction * _Nonnull action) {
_osoFetcher.subtitleLanguageId = itemID;
[defaults setObject:itemID forKey:kVLCSettingLastUsedSubtitlesSearchLanguage];
[defaults synchronize];
[self searchForMedia];
[self.tableView reloadData];
}];
......
......@@ -141,7 +141,6 @@
[vpc setAudioPassthrough:bValue];
[defaults setBool:bValue forKey:kVLCSettingUseSPDIF];
[defaults synchronize];
/* restart the audio output */
NSInteger currentAudioTrackIndex = [vpc indexOfCurrentAudioTrack];
[vpc selectAudioTrackAtIndex:0];
......
......@@ -112,7 +112,6 @@
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * _Nonnull action) {
[_userDefaults setObject:value forKey:[specifier key]];
[_userDefaults synchronize];
[self.tableView reloadData];
}];
[alertController addAction:action];
......@@ -128,7 +127,6 @@
} else if ([specifierType isEqualToString:kIASKPSToggleSwitchSpecifier]) {
NSString *specifierKey = [specifier key];
[_userDefaults setBool:![_userDefaults boolForKey:specifierKey] forKey:specifierKey];
[_userDefaults synchronize];
[self.tableView reloadData];
} else {
VLCAboutViewController *targetViewController = [[VLCAboutViewController alloc] initWithNibName:nil bundle:nil];
......
......@@ -433,11 +433,6 @@ didFailToContinueUserActivityWithType:(NSString *)userActivityType
}
}
- (void)applicationWillTerminate:(UIApplication *)application
{
[[NSUserDefaults standardUserDefaults] synchronize];
}
- (void)application:(UIApplication *)application performActionForShortcutItem:(UIApplicationShortcutItem *)shortcutItem completionHandler:(void (^)(BOOL))completionHandler
{
[[VLCSidebarController sharedInstance] performActionForShortcutItem:shortcutItem];
......
......@@ -269,7 +269,6 @@ static NSString *kUsingTableViewToShowData = @"UsingTableViewToShowData";
if (![[defaults objectForKey:kDisplayedFirstSteps] boolValue]) {
[self.emptyLibraryView performSelector:@selector(learnMore:) withObject:nil afterDelay:1.];
[defaults setObject:[NSNumber numberWithBool:YES] forKey:kDisplayedFirstSteps];
[defaults synchronize];
}
if ([_mediaDataSource numberOfFiles] < 1)
......
......@@ -150,7 +150,6 @@
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setBool:self.privateToggleSwitch.on forKey:kVLCPrivateWebStreaming];
[defaults setBool:self.ScanSubToggleSwitch.on forKey:kVLChttpScanSubtitle];
[defaults synchronize];
/* force update before we leave */
[[NSUbiquitousKeyValueStore defaultStore] synchronize];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment