diff --git a/Signal/src/AppDelegate.m b/Signal/src/AppDelegate.m index 0a991e47c..af10bde48 100644 --- a/Signal/src/AppDelegate.m +++ b/Signal/src/AppDelegate.m @@ -156,7 +156,7 @@ static NSString *const kURLHostVerifyPrefix = @"verify"; DDLogDebug(@"%@ Successfully ran syncPushTokensJob.", self.tag); }) .catch(^(NSError *_Nonnull error) { - DDLogDebug(@"%@ Failed to run syncPushTokensJob with error: %@", self.tag, error); + DDLogError(@"%@ Failed to run syncPushTokensJob with error: %@", self.tag, error); }); // Clean up any messages that expired since last launch. diff --git a/Signal/src/ViewControllers/AdvancedSettingsTableViewController.m b/Signal/src/ViewControllers/AdvancedSettingsTableViewController.m index 068260d4c..49483762a 100644 --- a/Signal/src/ViewControllers/AdvancedSettingsTableViewController.m +++ b/Signal/src/ViewControllers/AdvancedSettingsTableViewController.m @@ -137,9 +137,11 @@ typedef NS_ENUM(NSInteger, AdvancedSettingsTableViewControllerSection) { syncJob.uploadOnlyIfStale = NO; [syncJob run] .then(^{ + DDLogDebug(@"%@ Successfully ran syncPushTokensJob.", self.tag); SignalAlertView(NSLocalizedString(@"PUSH_REGISTER_SUCCESS", @"Alert title"), nil); }) .catch(^(NSError *error) { + DDLogError(@"%@ Failed to run syncPushTokensJob with error: %@", self.tag, error); SignalAlertView(NSLocalizedString(@"REGISTRATION_BODY", @"Alert title"), error.localizedDescription); }); diff --git a/Signal/src/ViewControllers/SignalsViewController.m b/Signal/src/ViewControllers/SignalsViewController.m index a603ef05c..e2782a3cb 100644 --- a/Signal/src/ViewControllers/SignalsViewController.m +++ b/Signal/src/ViewControllers/SignalsViewController.m @@ -18,6 +18,7 @@ #import "TSStorageManager.h" #import "UIUtil.h" #import "VersionMigrations.h" +#import #import #import #import @@ -336,11 +337,15 @@ NSString *const SignalsViewControllerSegueShowIncomingCall = @"ShowIncomingCallS - (void)ensureNotificationsUpToDate { - OWSSyncPushTokensJob *syncPushTokensJob = - [[OWSSyncPushTokensJob alloc] initWithPushManager:[PushManager sharedManager] - accountManager:self.accountManager - preferences:[Environment preferences]]; - [syncPushTokensJob run]; + [OWSSyncPushTokensJob runWithPushManager:[PushManager sharedManager] + accountManager:self.accountManager + preferences:[Environment preferences]] + .then(^{ + DDLogDebug(@"%@ Successfully ran syncPushTokensJob.", self.tag); + }) + .catch(^(NSError *_Nonnull error) { + DDLogError(@"%@ Failed to run syncPushTokensJob with error: %@", self.tag, error); + }); } - (void)tableViewSetUp {