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

@ -110,9 +110,8 @@ function _findBestFolderName(apps) {
// If a category is present in all apps, its counter will
// reach appInfos.length
if (category.length > 0 &&
categoryCounter[category] == appInfos.length) {
categoryCounter[category] == appInfos.length)
categories.push(category);
}
}
return categories;
}, commonCategories);
@ -764,9 +763,8 @@ var AllView = GObject.registerClass({
// Within the grid boundaries, or already animating
if (dragEvent.y > gridY && dragEvent.y < gridBottom ||
this._adjustment.get_transition('value') != null) {
this._adjustment.get_transition('value') != null)
return;
}
// Moving above the grid
let currentY = this._adjustment.value;
@ -777,9 +775,8 @@ var AllView = GObject.registerClass({
// Moving below the grid
let maxY = this._adjustment.upper - this._adjustment.page_size;
if (dragEvent.y >= gridBottom && currentY < maxY) {
if (dragEvent.y >= gridBottom && currentY < maxY)
this.goToPage(this._grid.currentPage + 1);
}
}
_onDragBegin() {
@ -2257,11 +2254,10 @@ var AppIcon = GObject.registerClass({
}
activateWindow(metaWindow) {
if (metaWindow) {
if (metaWindow)
Main.activateWindow(metaWindow);
} else {
else
Main.overview.hide();
}
}
_onMenuPoppedDown() {