Commit 86975e60 authored by Sebastián Katzer's avatar Sebastián Katzer
Browse files

Always call ontrigger if the app runs in foreground

parent d2ef77dd
Loading
Loading
Loading
Loading
+4 −0
Changes for src/ios/APPLocalNotification.m: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -396,6 +396,10 @@
    NSTimeInterval fireDateDistance = [now timeIntervalSinceDate:fireDate];
    NSString* event = (fireDateDistance < 1) ? @"trigger" : @"click";

    if ([[self applicationState] isEqualToString:@"foreground"]) {
        event = @"trigger";
    }

    if (autoCancel && [event isEqualToString:@"click"]) {
        [self cancelNotification:notification fireEvent:YES];
    }