Skip to content

Commit

Permalink
Fix: set once, call twice; concisely
Browse files Browse the repository at this point in the history
  • Loading branch information
l3nn4rt committed Jun 15, 2020
1 parent 5448cb8 commit 23a80e6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -1249,11 +1249,10 @@ var dtpPanel = Utils.defineClass({
//gnome-shell < 3.30 needs an additional "screen" param
global.screen ? args.push(global.screen) : 0;

if (!Me.settings.get_boolean('scroll-panel-show-ws-popup'))
Main.wm._workspaceSwitcherPopup = { display: () => {} };
let showWsPopup = Me.settings.get_boolean('scroll-panel-show-ws-popup');
showWsPopup ? 0 : Main.wm._workspaceSwitcherPopup = { display: () => {} };
Main.wm._showWorkspaceSwitcher.apply(Main.wm, args.concat([0, { get_name: () => 'switch---' + direction }]));
if (!Me.settings.get_boolean('scroll-panel-show-ws-popup'))
Main.wm._workspaceSwitcherPopup = null;
showWsPopup ? 0 : Main.wm._workspaceSwitcherPopup = null;
} else if (direction && scrollAction === 'CYCLE_WINDOWS') {
let windows = this.taskbar.getAppInfos().reduce((ws, appInfo) => ws.concat(appInfo.windows), []);

Expand Down

0 comments on commit 23a80e6

Please sign in to comment.