cleanup: Prefer template strings
Template strings are much nicer than string concatenation, so use them where possible; this excludes translatable strings and any strings containing '/' (until we can depend on gettext >= 0.20[0]). [0] https://savannah.gnu.org/bugs/?50920 https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/612
This commit is contained in:

committed by
Florian Müllner

parent
46874eed05
commit
0d035a4e53
@ -218,14 +218,14 @@ class NotificationApplicationPolicy extends NotificationPolicy {
|
||||
|
||||
this._masterSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.notifications' });
|
||||
this._settings = new Gio.Settings({ schema_id: 'org.gnome.desktop.notifications.application',
|
||||
path: '/org/gnome/desktop/notifications/application/' + this._canonicalId + '/' });
|
||||
path: `/org/gnome/desktop/notifications/application/${this._canonicalId}/` });
|
||||
|
||||
this._masterSettings.connect('changed', this._changed.bind(this));
|
||||
this._settings.connect('changed', this._changed.bind(this));
|
||||
}
|
||||
|
||||
store() {
|
||||
this._settings.set_string('application-id', this.id + '.desktop');
|
||||
this._settings.set_string('application-id', `${this.id}.desktop`);
|
||||
|
||||
let apps = this._masterSettings.get_strv('application-children');
|
||||
if (!apps.includes(this._canonicalId)) {
|
||||
@ -988,7 +988,7 @@ var MessageTray = class MessageTray {
|
||||
|
||||
add(source) {
|
||||
if (this.contains(source)) {
|
||||
log('Trying to re-add source ' + source.title);
|
||||
log(`Trying to re-add source ${source.title}`);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user