Merge pull request #1853 from dpalou/MOBILE-2947

MOBILE-2947 notification: Apply color to small icon
main
Juan Leyva 2019-04-26 16:03:22 +02:00 committed by GitHub
commit 6e69bebc02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View File

@ -70,5 +70,6 @@
"multisitesdisplay": "",
"skipssoconfirmation": false,
"forcedefaultlanguage": false,
"privacypolicy": "https:\/\/moodle.org\/mod\/page\/view.php?id=8148"
"privacypolicy": "https:\/\/moodle.org\/mod\/page\/view.php?id=8148",
"notificoncolor": "#f98012"
}

View File

@ -241,7 +241,8 @@ export class CorePushNotificationsProvider {
return {
android: {
sound: !!soundEnabled,
icon: 'smallicon'
icon: 'smallicon',
iconColor: CoreConfigConstants.notificoncolor
},
ios: {
alert: 'true',

View File

@ -25,6 +25,7 @@ import { CoreTextUtilsProvider } from './utils/text';
import { CoreUtilsProvider } from './utils/utils';
import { SQLiteDB, SQLiteDBTableSchema } from '@classes/sqlitedb';
import { CoreConstants } from '@core/constants';
import { CoreConfigConstants } from '../configconstants';
import { Subject, Subscription } from 'rxjs';
/*
@ -481,6 +482,7 @@ export class CoreLocalNotificationsProvider {
if (this.platform.is('android')) {
notification.icon = notification.icon || 'res://icon';
notification.smallIcon = notification.smallIcon || 'res://smallicon';
notification.color = notification.color || CoreConfigConstants.notificoncolor;
const led: any = notification.led || {};
notification.led = {