diff options
author | Stefan Malzner <stefan@adlk.io> | 2017-10-27 11:51:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-27 11:51:48 +0200 |
commit | db4fba548322c39730041cee0c9c707ca8afd719 (patch) | |
tree | efbb7c3472f9abdc1e0282fe465b54ca3c8e94d6 /src | |
parent | Merge pull request #123 from phmigotto/develop (diff) | |
parent | Merge branch 'develop' into fix_tray (diff) | |
download | ferdium-app-db4fba548322c39730041cee0c9c707ca8afd719.tar.gz ferdium-app-db4fba548322c39730041cee0c9c707ca8afd719.tar.zst ferdium-app-db4fba548322c39730041cee0c9c707ca8afd719.zip |
Merge pull request #134 from atakangktepe/fix_tray
Fixed 'Show Franz' button in tray
Diffstat (limited to 'src')
-rw-r--r-- | src/index.js | 2 | ||||
-rw-r--r-- | src/lib/Tray.js | 9 |
2 files changed, 3 insertions, 8 deletions
diff --git a/src/index.js b/src/index.js index 9ca059f48..030736fee 100644 --- a/src/index.js +++ b/src/index.js | |||
@@ -66,7 +66,7 @@ const createWindow = async () => { | |||
66 | }); | 66 | }); |
67 | 67 | ||
68 | // Initialize System Tray | 68 | // Initialize System Tray |
69 | const trayIcon = new Tray(mainWindow); | 69 | const trayIcon = new Tray(); |
70 | 70 | ||
71 | // Initialize ipcApi | 71 | // Initialize ipcApi |
72 | ipcApi({ mainWindow, settings, trayIcon }); | 72 | ipcApi({ mainWindow, settings, trayIcon }); |
diff --git a/src/lib/Tray.js b/src/lib/Tray.js index 67150971e..525ce592e 100644 --- a/src/lib/Tray.js +++ b/src/lib/Tray.js | |||
@@ -6,13 +6,8 @@ const INDICATOR_TRAY_PLAIN = 'tray'; | |||
6 | const INDICATOR_TRAY_UNREAD = 'tray-unread'; | 6 | const INDICATOR_TRAY_UNREAD = 'tray-unread'; |
7 | 7 | ||
8 | export default class TrayIcon { | 8 | export default class TrayIcon { |
9 | mainWindow = null; | ||
10 | trayIcon = null; | 9 | trayIcon = null; |
11 | 10 | ||
12 | constructor(mainWindow) { | ||
13 | this.mainWindow = mainWindow; | ||
14 | } | ||
15 | |||
16 | show() { | 11 | show() { |
17 | if (this.trayIcon) return; | 12 | if (this.trayIcon) return; |
18 | 13 | ||
@@ -21,7 +16,7 @@ export default class TrayIcon { | |||
21 | { | 16 | { |
22 | label: 'Show Franz', | 17 | label: 'Show Franz', |
23 | click() { | 18 | click() { |
24 | this.mainWindow.show(); | 19 | app.mainWindow.show(); |
25 | }, | 20 | }, |
26 | }, { | 21 | }, { |
27 | label: 'Quit Franz', | 22 | label: 'Quit Franz', |
@@ -35,7 +30,7 @@ export default class TrayIcon { | |||
35 | this.trayIcon.setContextMenu(trayMenu); | 30 | this.trayIcon.setContextMenu(trayMenu); |
36 | 31 | ||
37 | this.trayIcon.on('click', () => { | 32 | this.trayIcon.on('click', () => { |
38 | this.mainWindow.show(); | 33 | app.mainWindow.show(); |
39 | }); | 34 | }); |
40 | } | 35 | } |
41 | 36 | ||