cleanup: Only omit braces for single-line blocks
Braces can be avoided when a block consists of a single statement, but readability suffers when the statement spans more than a single line. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/805
This commit is contained in:

committed by
Georges Basile Stavracas Neto

parent
c860409da5
commit
07cc84f632
@ -455,9 +455,10 @@ var IconGrid = GObject.registerClass({
|
||||
}
|
||||
|
||||
animatePulse(animationDirection) {
|
||||
if (animationDirection != AnimationDirection.IN)
|
||||
if (animationDirection != AnimationDirection.IN) {
|
||||
throw new GObject.NotImplementedError("Pulse animation only implements " +
|
||||
"'in' animation direction");
|
||||
}
|
||||
|
||||
this._resetAnimationActors();
|
||||
|
||||
@ -805,9 +806,10 @@ var IconGrid = GObject.registerClass({
|
||||
|
||||
this._updateSpacingForSize(availWidth, availHeight);
|
||||
}
|
||||
if (!this._updateIconSizesLaterId)
|
||||
if (!this._updateIconSizesLaterId) {
|
||||
this._updateIconSizesLaterId = Meta.later_add(Meta.LaterType.BEFORE_REDRAW,
|
||||
this._updateIconSizes.bind(this));
|
||||
}
|
||||
}
|
||||
|
||||
// Note that this is ICON_SIZE as used by BaseIcon, not elsewhere in IconGrid; it's a bit messed up
|
||||
|
Reference in New Issue
Block a user