feat: Update new user report data in notification extension

This commit is contained in:
Andrea Busi
2022-11-15 22:40:44 +01:00
parent e9986e0fe1
commit dfdbbd0ed4
4 changed files with 12 additions and 19 deletions
@@ -75,20 +75,9 @@ static NSString * const EQNSoundNotificationEQN = @"alert_sound.wav";
break;
}
} else if ([notificationType isEqualToString:@"manual"]) {
NSString *intensity = [userInfo objectForKey:@"magnitude"];
switch ([intensity intValue]) {
case 0:
iconName = @"star_green.png";
break;
case 1:
iconName = @"star_yellow.png";
break;
case 2:
iconName = @"star_red.png";
break;
default:
break;
}
// there are 12 levels, so a customized icon doesn't make sense
// use a generic warning icon instead
iconName = @"warning_yellow.png";
} else if ([notificationType isEqualToString:@"official"]) {
NSString *provaider = [userInfo objectForKey:@"provider"];
double intensity = [[userInfo objectForKey:@"magnitude"] doubleValue];