ios send local notification can accept 0 as params

This commit is contained in:
huangminlinux 2018-10-23 18:15:29 +08:00
parent 265d88e766
commit e60d7c2b8c

View File

@ -395,13 +395,14 @@
}
JPushNotificationTrigger *trigger = [[JPushNotificationTrigger alloc] init];
// 0 android
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 10.0) {
if (delay) {
trigger.timeInterval = [delay doubleValue];
trigger.timeInterval = [delay doubleValue] + 0.000001;
}
} else {
if (delay) {
trigger.fireDate = [NSDate dateWithTimeIntervalSinceNow:[[command argumentAtIndex:0] intValue]];
trigger.fireDate = [NSDate dateWithTimeIntervalSinceNow:[[command argumentAtIndex:0] doubleValue] + 0.001];
}
}