From c49d31982cdf013dc799f1a0b02210dac5eb046a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=A8=E3=83=AA=E3=82=B9?= Date: Mon, 2 Dec 2024 00:32:20 +0900 Subject: [PATCH] fix(ios): reset flags & store message after processing notification received --- src/ios/PushPlugin.m | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/ios/PushPlugin.m b/src/ios/PushPlugin.m index eb3372dfb..1b62c08b7 100644 --- a/src/ios/PushPlugin.m +++ b/src/ios/PushPlugin.m @@ -338,8 +338,6 @@ - (void)pushPluginOnApplicationDidBecomeActive:(NSNotification *)notification { } if (self.launchNotification) { - self.isInline = NO; - self.coldstart = NO; self.notificationMessage = self.launchNotification; self.launchNotification = nil; [self performSelectorOnMainThread:@selector(notificationReceived) withObject:self waitUntilDone:NO]; @@ -560,10 +558,11 @@ - (void)notificationReceived { CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:message]; [pluginResult setKeepCallbackAsBool:YES]; [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId]; - - self.coldstart = NO; - self.notificationMessage = nil; } + + self.isInline = NO; + self.coldstart = NO; + self.notificationMessage = nil; } - (void)clearNotification:(CDVInvokedUrlCommand *)command {