Commit 0ae10b80 by Sebastián Katzer

Experimental decrease time-frame for trigger event

parent f0ca49c4
......@@ -7,6 +7,7 @@ Please also read the [Upgrade Guide](https://github.com/katzer/cordova-plugin-lo
- New `color` attribute for Android (Thanks to @Eusebius1920)
- New `quarter` intervall for iOS & Android
- Made small icon optional (Android)
- Decreased time-frame for trigger event (iOS)
- Windows platform works without hooks
- `update` checks for permission like `schedule`
- Fixed #634 option to skip permission check
......
......@@ -571,12 +571,11 @@
{
UILocalNotification* notification = [localNotification object];
if ([notification userInfo] == NULL || [notification wasUpdated] )
if ([notification userInfo] == NULL || [notification wasUpdated])
return;
NSTimeInterval timeInterval = [notification timeIntervalSinceLastTrigger];
NSString* event = (timeInterval <= 1 && deviceready) ? @"trigger" : @"click";
NSString* event = timeInterval < 0.2 && deviceready ? @"trigger" : @"click";
[self fireEvent:event notification:notification];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment