MOBILE-2961 push: Use notification icon in foreground

main
Dani Palou 2019-04-16 17:10:58 +02:00
parent 258a646f20
commit b0c33b1526
1 changed files with 7 additions and 0 deletions

View File

@ -339,6 +339,13 @@ export class CorePushNotificationsProvider {
localNotif.text = notification.message;
}));
if (this.utils.isTrueOrOne(data.extrafeatures)) {
// Extra features enabled.
localNotif.icon = notification.image;
// This feature isn't supported by the official plugin, we use a fork.
(<any> localNotif).iconType = data['image-type'];
}
Promise.all(promises).then(() => {
this.localNotificationsProvider.schedule(localNotif, CorePushNotificationsProvider.COMPONENT, data.site);
});