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
@ -474,7 +474,7 @@ class FdoNotificationDaemonSource extends MessageTray.Source {
|
||||
return app;
|
||||
|
||||
if (appId) {
|
||||
app = Shell.AppSystem.get_default().lookup_app(appId + '.desktop');
|
||||
app = Shell.AppSystem.get_default().lookup_app(`${appId}.desktop`);
|
||||
if (app != null)
|
||||
return app;
|
||||
}
|
||||
@ -610,7 +610,7 @@ function objectPathFromAppId(appId) {
|
||||
}
|
||||
|
||||
function getPlatformData() {
|
||||
let startupId = GLib.Variant.new('s', '_TIME' + global.get_current_time());
|
||||
let startupId = GLib.Variant.new('s', `_TIME${global.get_current_time()}`);
|
||||
return { "desktop-startup-id": startupId };
|
||||
}
|
||||
|
||||
@ -623,7 +623,7 @@ class GtkNotificationDaemonAppSource extends MessageTray.Source {
|
||||
if (!GLib.Variant.is_object_path(objectPath))
|
||||
throw new InvalidAppError();
|
||||
|
||||
let app = Shell.AppSystem.get_default().lookup_app(appId + '.desktop');
|
||||
let app = Shell.AppSystem.get_default().lookup_app(`${appId}.desktop`);
|
||||
if (!app)
|
||||
throw new InvalidAppError();
|
||||
|
||||
|
Reference in New Issue
Block a user