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
@ -286,7 +286,7 @@ var ExtensionManager = class {
|
|||||||
reloadExtension(oldExtension) {
|
reloadExtension(oldExtension) {
|
||||||
// Grab the things we'll need to pass to createExtensionObject
|
// Grab the things we'll need to pass to createExtensionObject
|
||||||
// to reload it.
|
// to reload it.
|
||||||
let { uuid: uuid, dir: dir, type: type } = oldExtension;
|
let { uuid, dir, type } = oldExtension;
|
||||||
|
|
||||||
// Then unload the old extension.
|
// Then unload the old extension.
|
||||||
this.unloadExtension(oldExtension);
|
this.unloadExtension(oldExtension);
|
||||||
|
@ -541,15 +541,15 @@ class GtkNotificationDaemonNotification extends MessageTray.Notification {
|
|||||||
super(source);
|
super(source);
|
||||||
this._serialized = GLib.Variant.new('a{sv}', notification);
|
this._serialized = GLib.Variant.new('a{sv}', notification);
|
||||||
|
|
||||||
let { "title": title,
|
let { title,
|
||||||
"body": body,
|
body,
|
||||||
"icon": gicon,
|
icon: gicon,
|
||||||
"urgent": urgent,
|
urgent,
|
||||||
"priority": priority,
|
priority,
|
||||||
"buttons": buttons,
|
buttons,
|
||||||
"default-action": defaultAction,
|
"default-action": defaultAction,
|
||||||
"default-action-target": defaultActionTarget,
|
"default-action-target": defaultActionTarget,
|
||||||
"timestamp": time } = notification;
|
timestamp: time } = notification;
|
||||||
|
|
||||||
if (priority) {
|
if (priority) {
|
||||||
let urgency = PRIORITY_URGENCY_MAP[priority.unpack()];
|
let urgency = PRIORITY_URGENCY_MAP[priority.unpack()];
|
||||||
@ -590,8 +590,8 @@ class GtkNotificationDaemonNotification extends MessageTray.Notification {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_onButtonClicked(button) {
|
_onButtonClicked(button) {
|
||||||
let { 'action': action, 'target': actionTarget } = button;
|
let { action, target } = button;
|
||||||
this._activateAction(action.unpack(), actionTarget);
|
this._activateAction(action.unpack(), target);
|
||||||
}
|
}
|
||||||
|
|
||||||
activate() {
|
activate() {
|
||||||
|
@ -903,7 +903,7 @@ var LayoutStrategy = class {
|
|||||||
computeWindowSlots(layout, area) {
|
computeWindowSlots(layout, area) {
|
||||||
this._computeRowSizes(layout);
|
this._computeRowSizes(layout);
|
||||||
|
|
||||||
let { rows: rows, scale: scale } = layout;
|
let { rows, scale } = layout;
|
||||||
|
|
||||||
let slots = [];
|
let slots = [];
|
||||||
|
|
||||||
@ -978,7 +978,7 @@ var LayoutStrategy = class {
|
|||||||
|
|
||||||
var UnalignedLayoutStrategy = class extends LayoutStrategy {
|
var UnalignedLayoutStrategy = class extends LayoutStrategy {
|
||||||
_computeRowSizes(layout) {
|
_computeRowSizes(layout) {
|
||||||
let { rows: rows, scale: scale } = layout;
|
let { rows, scale } = layout;
|
||||||
for (let i = 0; i < rows.length; i++) {
|
for (let i = 0; i < rows.length; i++) {
|
||||||
let row = rows[i];
|
let row = rows[i];
|
||||||
row.width = row.fullWidth * scale + (row.windows.length - 1) * this._columnSpacing;
|
row.width = row.fullWidth * scale + (row.windows.length - 1) * this._columnSpacing;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user