cleanup: Avoid unnecessary braces

Our coding style has always been to avoid braces when all blocks
are single-lines.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/805
This commit is contained in:
Florian Müllner
2019-08-20 02:51:42 +02:00
committed by Georges Basile Stavracas Neto
parent 69f63dc94f
commit 67ea424525
38 changed files with 136 additions and 201 deletions

View File

@ -58,9 +58,8 @@ var AutomountManager = class {
_InhibitorsChanged(_object, _senderName, [_inhibitor]) {
this._session.IsInhibitedRemote(GNOME_SESSION_AUTOMOUNT_INHIBIT,
(result, error) => {
if (!error) {
if (!error)
this._inhibited = result[0];
}
});
}

View File

@ -245,11 +245,10 @@ var AutorunDispatcher = class {
let success = false;
let app = null;
if (setting == AutorunSetting.RUN) {
if (setting == AutorunSetting.RUN)
app = Gio.app_info_get_default_for_type(contentTypes[0], false);
} else if (setting == AutorunSetting.FILES) {
else if (setting == AutorunSetting.FILES)
app = Gio.app_info_get_default_for_type('inode/directory', false);
}
if (app)
success = startAppForMount(app, mount);

View File

@ -349,11 +349,10 @@ class ChatSource extends MessageTray.Source {
getIcon() {
let file = this._contact.get_avatar_file();
if (file) {
if (file)
return new Gio.FileIcon({ file: file });
} else {
else
return new Gio.ThemedIcon({ name: 'avatar-default' });
}
}
getSecondaryIcon() {