2
0
mirror of synced 2025-02-02 09:34:45 +00:00

flag checking fix

This commit is contained in:
Kevin 2017-11-16 16:58:10 +08:00
parent 0577518578
commit 02ac39678e

View File

@ -45,8 +45,10 @@ RCT_ENUM_CONVERTER(NSCalendarUnit,
content.userInfo = details; content.userInfo = details;
content.badge = [RCTConvert NSNumber:details[@"badge"]]; content.badge = [RCTConvert NSNumber:details[@"badge"]];
if(details[@"show_in_foreground"]) { if([details objectForKey:@"show_in_foreground"] != nil) {
[content setValue:@YES forKeyPath:@"shouldAlwaysAlertWhileAppIsForeground"]; if([(NSNumber *)details[@"show_in_foreground"] boolValue] == YES) {
[content setValue:@YES forKeyPath:@"shouldAlwaysAlertWhileAppIsForeground"];
}
} }
NSDate *fireDate = [RCTConvert NSDate:details[@"fire_date"]]; NSDate *fireDate = [RCTConvert NSDate:details[@"fire_date"]];