Skip to content

Commit

Permalink
fix(ios): reset flags & store message after processing notification r…
Browse files Browse the repository at this point in the history
…eceived
  • Loading branch information
erisu committed Dec 1, 2024
1 parent 0117971 commit c49d319
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/ios/PushPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit c49d319

Please sign in to comment.