mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
cleanup: Avoid pointless "renames" in destructuring
ES5 allows to rename variables in object destructuring, however this only makes sense when we want to use a different name than the object property. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731
This commit is contained in:
parent
93525539c2
commit
111f87a1b2
3 changed files with 12 additions and 12 deletions
|
|
@ -541,15 +541,15 @@ class GtkNotificationDaemonNotification extends MessageTray.Notification {
|
|||
super(source);
|
||||
this._serialized = GLib.Variant.new('a{sv}', notification);
|
||||
|
||||
let { "title": title,
|
||||
"body": body,
|
||||
"icon": gicon,
|
||||
"urgent": urgent,
|
||||
"priority": priority,
|
||||
"buttons": buttons,
|
||||
let { title,
|
||||
body,
|
||||
icon: gicon,
|
||||
urgent,
|
||||
priority,
|
||||
buttons,
|
||||
"default-action": defaultAction,
|
||||
"default-action-target": defaultActionTarget,
|
||||
"timestamp": time } = notification;
|
||||
timestamp: time } = notification;
|
||||
|
||||
if (priority) {
|
||||
let urgency = PRIORITY_URGENCY_MAP[priority.unpack()];
|
||||
|
|
@ -590,8 +590,8 @@ class GtkNotificationDaemonNotification extends MessageTray.Notification {
|
|||
}
|
||||
|
||||
_onButtonClicked(button) {
|
||||
let { 'action': action, 'target': actionTarget } = button;
|
||||
this._activateAction(action.unpack(), actionTarget);
|
||||
let { action, target } = button;
|
||||
this._activateAction(action.unpack(), target);
|
||||
}
|
||||
|
||||
activate() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue