From d95d0671d6c3b0fc9de165e4247f239fa8fdf55a Mon Sep 17 00:00:00 2001 From: Niels Andriesse Date: Fri, 10 May 2019 16:47:24 +1000 Subject: [PATCH] Remove unnecessary local notification generation --- Signal/src/AppDelegate.m | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/Signal/src/AppDelegate.m b/Signal/src/AppDelegate.m index a513c9d7f..43566b3c9 100644 --- a/Signal/src/AppDelegate.m +++ b/Signal/src/AppDelegate.m @@ -1149,23 +1149,9 @@ static NSTimeInterval launchStartedAt; - (void)application:(UIApplication *)application performFetchWithCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler { - - UNMutableNotificationContent *notificationContent = [UNMutableNotificationContent new]; - notificationContent.title = @"Background Fetch"; - notificationContent.body = @"Fetching messages in the background..."; - UNNotificationRequest *notificationRequest = [UNNotificationRequest requestWithIdentifier:[NSUUID UUID].UUIDString content:notificationContent trigger:nil]; - [UNUserNotificationCenter.currentNotificationCenter addNotificationRequest:notificationRequest withCompletionHandler:nil]; - OWSLogInfo(@"performing background fetch"); [AppReadiness runNowOrWhenAppDidBecomeReady:^{ __block AnyPromise *job = [AppEnvironment.shared.messageFetcherJob run].then(^{ - - UNMutableNotificationContent *notificationContent = [UNMutableNotificationContent new]; - notificationContent.title = @"New Messages"; - notificationContent.body = @"You have new messages"; - UNNotificationRequest *notificationRequest = [UNNotificationRequest requestWithIdentifier:[NSUUID UUID].UUIDString content:notificationContent trigger:nil]; - [UNUserNotificationCenter.currentNotificationCenter addNotificationRequest:notificationRequest withCompletionHandler:nil]; - // HACK: Call completion handler after n seconds. // // We don't currently have a convenient API to know when message fetching is *done* when