Fix nil argument when processing remote notification

This commit is contained in:
Evan Hahn 2022-09-02 17:26:46 +00:00 committed by GitHub
parent e12007ea8f
commit 08e5c272b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -302,7 +302,7 @@ static void uncaughtExceptionHandler(NSException *exception)
NSDictionary *remoteNotification = launchOptions[UIApplicationLaunchOptionsRemoteNotificationKey];
if (remoteNotification) {
OWSLogInfo(@"Application was launched by tapping a push notification.");
[self processRemoteNotification:remoteNotification completion:nil];
[self processRemoteNotification:remoteNotification];
}
[OWSScreenLockUI.shared setupWithRootWindow:self.window];

View File

@ -233,7 +233,12 @@ extension AppDelegate {
}
@objc
func processRemoteNotification(_ remoteNotification: NSDictionary, completion: @escaping () -> Void = {}) {
func processRemoteNotification(_ remoteNotification: NSDictionary) {
processRemoteNotification(remoteNotification) {}
}
@objc
func processRemoteNotification(_ remoteNotification: NSDictionary, completion: @escaping () -> Void) {
AssertIsOnMainThread()
guard !didAppLaunchFail else {