cleanup: Don't shadow variables

Having variables that share the same name in overlapping scopes is
confusing and error-prone, and is best avoided.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/805
This commit is contained in:
Florian Müllner
2019-08-20 02:20:08 +02:00
committed by Georges Basile Stavracas Neto
parent 2e4e2500dd
commit 682bd7e97c
34 changed files with 85 additions and 86 deletions

View File

@ -230,10 +230,10 @@ var NotificationsBox = GObject.registerClass({
this._showSource(source, obj, obj.sourceBox);
this._notificationBox.add_child(obj.sourceBox);
obj.sourceCountChangedId = source.connect('notify::count', source => {
obj.sourceCountChangedId = source.connect('notify::count', () => {
this._countChanged(source, obj);
});
obj.sourceTitleChangedId = source.connect('notify::title', source => {
obj.sourceTitleChangedId = source.connect('notify::title', () => {
this._titleChanged(source, obj);
});
obj.policyChangedId = source.policy.connect('notify', (policy, pspec) => {
@ -242,7 +242,7 @@ var NotificationsBox = GObject.registerClass({
else
this._detailedChanged(source, obj);
});
obj.sourceDestroyId = source.connect('destroy', source => {
obj.sourceDestroyId = source.connect('destroy', () => {
this._onSourceDestroy(source, obj);
});