Prechádzať zdrojové kódy

`onclick` instead of `ontrigger` was called on "slow" iOS devices #89

Sebastián Katzer 11 rokov pred
rodič
commit
524252ae2b
2 zmenil súbory, kde vykonal 2 pridanie a 1 odobranie
  1. 1 0
      README.md
  2. 1 1
      src/ios/APPLocalNotification.m

+ 1 - 0
README.md

@@ -50,6 +50,7 @@ More informations can be found [here](https://build.phonegap.com/plugins/413).
 - [enhancement:] Avoid blocking the main thread (on Android) **(dpogue)**.
 - [bugfix:] `onadd` was called each time after a repeating message was triggered (Android)
 - [change:] Reset badge with cancelAll.
+- [bugfix:] `onclick` instead of `ontrigger` was called on "slow" iOS devices.
 
 #### Version 0.7.1 (31.01.2014)
 - [bugfix:] `ongoing` attribute was ignored.

+ 1 - 1
src/ios/APPLocalNotification.m

@@ -253,7 +253,7 @@ NSString *const kAPP_LOCALNOTIFICATION = @"APP_LOCALNOTIFICATION";
 
     NSDate* now                       = [NSDate date];
     NSTimeInterval fireDateDistance   = [now timeIntervalSinceDate:notification.fireDate];
-    NSString* event                   = (fireDateDistance < 0.01) ? @"trigger" : @"click";
+    NSString* event                   = (fireDateDistance < 0.05) ? @"trigger" : @"click";
 
     if (autoCancel && !isActive)
     {