From 1cab7c5c056b09d4836afb56fc0e26b3be77e8c6 Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Sun, 25 Feb 2018 22:37:20 -0500 Subject: [PATCH] Disable dock show on dispose (#38) Prevent flash of macOS dock icon during auto-updates. Fixes #36. --- modules/__tests__/dispose.test.js | 4 ---- modules/dispose.js | 3 --- 2 files changed, 7 deletions(-) diff --git a/modules/__tests__/dispose.test.js b/modules/__tests__/dispose.test.js index 9918253..ebca045 100644 --- a/modules/__tests__/dispose.test.js +++ b/modules/__tests__/dispose.test.js @@ -24,10 +24,6 @@ describe('dispose', () => { expect(showWindows).toHaveBeenCalledTimes(1); }); - it('shows the dock icon', () => { - expect(app.dock.show).toHaveBeenCalledTimes(1); - }); - it('unsubscribes from config changes', () => { expect(cfgUnsubscribeMock).toHaveBeenCalledTimes(1); }); diff --git a/modules/dispose.js b/modules/dispose.js index 201e39b..2ce0efe 100644 --- a/modules/dispose.js +++ b/modules/dispose.js @@ -5,9 +5,6 @@ module.exports = (app, callbacks = {}) => { const { cfgUnsubscribe, handleActivate, handleBlur } = callbacks; showWindows(app); - if (app.dock) { - app.dock.show(); - } // TODO: Unregister shortcut when supported // unregisterShortcut()