Преглед изворни кода

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

Sebastián Katzer пре 11 година
родитељ
комит
6693e7c319
1 измењених фајлова са 2 додато и 2 уклоњено
  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];
 }
 
 /**