workspace-indicator: Use existing property

We already track the current workspace index, use that
instead of getting it from the workspace manager again.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/307>
This commit is contained in:
Florian Müllner
2024-02-21 18:59:23 +01:00
committed by Marge Bot
parent 64060ef4c5
commit 25e854dde8
@@ -439,7 +439,7 @@ export class WorkspaceIndicator extends PanelMenu.Button {
return;
let newIndex = global.workspace_manager.get_active_workspace_index() + diff;
const newIndex = this._currentWorkspace + diff;
this._activate(newIndex);
}
}