cleanup: Use object shorthand where possible
ES6 allows to omit property names where they match the name of the assigned variable, which makes code less redunant and thus cleaner. We will soon enforce that in our eslint rules, so make sure we use the shorthand wherever possible. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/805
This commit is contained in:

committed by
Georges Basile Stavracas Neto

parent
9eaa0089d0
commit
c860409da5
@ -230,7 +230,7 @@ var AutomountManager = class {
|
||||
let existingDialog = prevOperation ? prevOperation.borrowDialog() : null;
|
||||
let operation =
|
||||
new ShellMountOperation.ShellMountOperation(volume,
|
||||
{ existingDialog: existingDialog });
|
||||
{ existingDialog });
|
||||
this._mountVolume(volume, operation);
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ class NetworkSecretDialog extends ModalDialog.ModalDialog {
|
||||
|
||||
secret.entry = new St.Entry({ style_class: 'prompt-dialog-password-entry',
|
||||
text: secret.value, can_focus: reactive,
|
||||
reactive: reactive,
|
||||
reactive,
|
||||
x_expand: true });
|
||||
ShellEntry.addContextMenu(secret.entry,
|
||||
{ isPassword: secret.password });
|
||||
@ -553,7 +553,7 @@ var VPNRequestHandler = class {
|
||||
contentOverride.secrets.push({
|
||||
label: keyfile.get_string(groups[i], 'Label'),
|
||||
key: groups[i],
|
||||
value: value,
|
||||
value,
|
||||
password: keyfile.get_boolean(groups[i], 'IsSecret'),
|
||||
});
|
||||
} else {
|
||||
|
@ -49,10 +49,10 @@ function makeMessageFromTpMessage(tpMessage, direction) {
|
||||
|
||||
return {
|
||||
messageType: tpMessage.get_message_type(),
|
||||
text: text,
|
||||
text,
|
||||
sender: tpMessage.sender.alias,
|
||||
timestamp: timestamp,
|
||||
direction: direction
|
||||
timestamp,
|
||||
direction
|
||||
};
|
||||
}
|
||||
|
||||
@ -66,7 +66,7 @@ function makeMessageFromTplEvent(event) {
|
||||
text: event.get_message(),
|
||||
sender: event.get_sender().get_alias(),
|
||||
timestamp: event.get_timestamp(),
|
||||
direction: direction
|
||||
direction
|
||||
};
|
||||
}
|
||||
|
||||
@ -350,7 +350,7 @@ class ChatSource extends MessageTray.Source {
|
||||
getIcon() {
|
||||
let file = this._contact.get_avatar_file();
|
||||
if (file)
|
||||
return new Gio.FileIcon({ file: file });
|
||||
return new Gio.FileIcon({ file });
|
||||
else
|
||||
return new Gio.ThemedIcon({ name: 'avatar-default' });
|
||||
}
|
||||
@ -683,10 +683,10 @@ var ChatNotification = HAVE_TP ? GObject.registerClass({
|
||||
? 'received' : 'sent');
|
||||
|
||||
this._append({ body: messageBody,
|
||||
group: group,
|
||||
styles: styles,
|
||||
group,
|
||||
styles,
|
||||
timestamp: message.timestamp,
|
||||
noTimestamp: noTimestamp });
|
||||
noTimestamp });
|
||||
}
|
||||
|
||||
_filterMessages() {
|
||||
|
Reference in New Issue
Block a user