diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2018-08-06 13:58:40 -0300 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2018-08-07 08:38:09 -0300 |
| commit | e4d5a3ba555b7d4abd0aa3447c554fa9a4fc0594 (patch) | |
| tree | b26d6386a44a60d253e475e0d9b63703f78c90b7 | |
| parent | 858ded2aa27ab9c86ecf79c1702ef07a2bdf60fe (diff) | |
| download | mullvadvpn-e4d5a3ba555b7d4abd0aa3447c554fa9a4fc0594.tar.xz mullvadvpn-e4d5a3ba555b7d4abd0aa3447c554fa9a4fc0594.zip | |
Move generic tray set-up to a new method
| -rw-r--r-- | app/main.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/app/main.js b/app/main.js index 5b242a644c..0a7fb6172a 100644 --- a/app/main.js +++ b/app/main.js @@ -150,10 +150,7 @@ const ApplicationMain = { this._installMacOsMenubarAppWindowHandlers(tray, windowController); break; default: - tray.on('click', () => { - windowController.toggle(); - }); - windowController.show(); + this._installGenericMenubarAppWindowHandlers(tray, windowController); break; } @@ -457,6 +454,13 @@ const ApplicationMain = { window.on('hide', () => macEventMonitor.stop()); tray.on('click', () => windowController.toggle()); }, + + _installGenericMenubarAppWindowHandlers(tray: Tray, windowController: WindowController) { + tray.on('click', () => { + windowController.toggle(); + }); + windowController.show(); + }, }; ApplicationMain.run(); |
