diff --git a/Riot/AppDelegate.m b/Riot/AppDelegate.m index 276c6657d..db380b2ec 100644 --- a/Riot/AppDelegate.m +++ b/Riot/AppDelegate.m @@ -2742,7 +2742,7 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN if (isPushRegistered) { // Enable push notifications by default on new added account - account.enablePushKitNotifications = YES; + [account enablePushKitNotifications:YES success:nil failure:nil]; } else { diff --git a/Riot/Modules/Settings/SettingsViewController.m b/Riot/Modules/Settings/SettingsViewController.m index 4cccbedf2..b8e545a09 100644 --- a/Riot/Modules/Settings/SettingsViewController.m +++ b/Riot/Modules/Settings/SettingsViewController.m @@ -2874,7 +2874,11 @@ SignOutAlertPresenterDelegate> if (accountManager.pushDeviceToken) { - [account setEnablePushKitNotifications:!account.isPushKitNotificationActive]; + [account enablePushKitNotifications:!account.isPushKitNotificationActive success:^{ + [self stopActivityIndicator]; + } failure:^(NSError *error) { + [self stopActivityIndicator]; + }]; } else { @@ -2887,7 +2891,11 @@ SignOutAlertPresenterDelegate> } else { - [account setEnablePushKitNotifications:YES]; + [account enablePushKitNotifications:YES success:^{ + [self stopActivityIndicator]; + } failure:^(NSError *error) { + [self stopActivityIndicator]; + }]; } }]; }