workspace: Use ES6 findIndex() method for getting window index
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/346
This commit is contained in:
parent
6b0c8c9fe0
commit
3730314dd5
@ -1206,12 +1206,7 @@ var Workspace = class {
|
||||
}
|
||||
|
||||
_lookupIndex(metaWindow) {
|
||||
for (let i = 0; i < this._windows.length; i++) {
|
||||
if (this._windows[i].metaWindow == metaWindow) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
return this._windows.findIndex(w => w.metaWindow == metaWindow);
|
||||
}
|
||||
|
||||
containsMetaWindow(metaWindow) {
|
||||
|
@ -319,12 +319,7 @@ var WorkspaceThumbnail = class {
|
||||
}
|
||||
|
||||
_lookupIndex(metaWindow) {
|
||||
for (let i = 0; i < this._windows.length; i++) {
|
||||
if (this._windows[i].metaWindow == metaWindow) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
return this._windows.findIndex(w => w.metaWindow == metaWindow);
|
||||
}
|
||||
|
||||
syncStacking(stackIndices) {
|
||||
|
Loading…
Reference in New Issue
Block a user