Merge pull request #2582 from vector-im/riot_2348

Push: Update code to follow API break
This commit is contained in:
manuroe
2019-07-16 15:50:36 +02:00
committed by GitHub
2 changed files with 11 additions and 3 deletions
+1 -1
View File
@@ -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
{
+10 -2
View File
@@ -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];
}];
}
}];
}