Explorar el Código

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

Sebastián Katzer hace 11 años
padre
commit
6693e7c319
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  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];
 }
 
 /**