Ver código fonte

The `oncancel` callback will be called at last if `autoCancel` is set to true

Sebastián Katzer 11 anos atrás
pai
commit
6693e7c319
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      src/ios/APPLocalNotification.m

+ 2 - 2
src/ios/APPLocalNotification.m

@@ -257,12 +257,12 @@ NSString *const kAPP_LOCALNOTIFICATION = @"APP_LOCALNOTIFICATION";
     NSTimeInterval fireDateDistance   = [now timeIntervalSinceDate:notification.fireDate];
     NSString* event                   = (fireDateDistance < 0.05) ? @"trigger" : @"click";
 
+    [self fireEvent:event id:id json:json];
+
     if (autoCancel && !isActive)
     {
         [self cancelNotificationWithId:id fireEvent:YES];
     }
-
-    [self fireEvent:event id:id json:json];
 }
 
 /**