diff --git a/Riot/AppDelegate.m b/Riot/AppDelegate.m index df04c3bcb..5ffa69a5a 100644 --- a/Riot/AppDelegate.m +++ b/Riot/AppDelegate.m @@ -414,10 +414,8 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN { // Move this setting into the shared userDefaults object to apply it to the extensions. [sharedUserDefaults setObject:language forKey:@"appLanguage"]; - [sharedUserDefaults synchronize]; - + [[NSUserDefaults standardUserDefaults] removeObjectForKey:@"appLanguage"]; - [[NSUserDefaults standardUserDefaults] synchronize]; } } [NSBundle mxk_setLanguage:language]; @@ -2994,7 +2992,6 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN if (!isErrorNotificationSuspended && ![[NSUserDefaults standardUserDefaults] boolForKey:@"deviceIdAtStartupChecked"]) { [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"deviceIdAtStartupChecked"]; - [[NSUserDefaults standardUserDefaults] synchronize]; // Check if there is a device id if (!mxSession.matrixRestClient.credentials.deviceId) diff --git a/Riot/Managers/Widgets/WidgetManager.m b/Riot/Managers/Widgets/WidgetManager.m index 360a359da..c225e140e 100644 --- a/Riot/Managers/Widgets/WidgetManager.m +++ b/Riot/Managers/Widgets/WidgetManager.m @@ -527,7 +527,6 @@ NSString *const WidgetManagerErrorDomain = @"WidgetManagerErrorDomain"; NSUserDefaults *userDefaults = [MXKAppSettings standardAppSettings].sharedUserDefaults; [userDefaults setObject:scalarTokens forKey:@"scalarTokens"]; - [userDefaults synchronize]; } @end diff --git a/Riot/Modules/Authentication/AuthenticationViewController.m b/Riot/Modules/Authentication/AuthenticationViewController.m index 7b7f83947..eb8c29a81 100644 --- a/Riot/Modules/Authentication/AuthenticationViewController.m +++ b/Riot/Modules/Authentication/AuthenticationViewController.m @@ -682,9 +682,7 @@ { [[NSUserDefaults standardUserDefaults] removeObjectForKey:@"customIdentityServerURL"]; } - - [[NSUserDefaults standardUserDefaults] synchronize]; - + // Restore default configuration [self setHomeServerTextFieldText:self.defaultHomeServerUrl]; [self setIdentityServerTextFieldText:self.defaultIdentityServerUrl]; diff --git a/Riot/Modules/Settings/SettingsViewController.m b/Riot/Modules/Settings/SettingsViewController.m index 726abe5de..9fc346cd5 100644 --- a/Riot/Modules/Settings/SettingsViewController.m +++ b/Riot/Modules/Settings/SettingsViewController.m @@ -4155,7 +4155,6 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(); // Store user settings NSUserDefaults *sharedUserDefaults = [MXKAppSettings standardAppSettings].sharedUserDefaults; [sharedUserDefaults setObject:language forKey:@"appLanguage"]; - [sharedUserDefaults synchronize]; // Do a reload in order to recompute strings in the new language // Note that "reloadMatrixSessions:NO" will reset room summaries