diff options
author | 2018-11-28 20:51:17 +0100 | |
---|---|---|
committer | 2018-11-28 20:51:17 +0100 | |
commit | 8b648553a115ed753f78bb81af2752eadaf47754 (patch) | |
tree | b56cfd517a836dffa6b738896df125940f9936b8 /src/electron/ipc-api | |
parent | fix(App): App menu was not initialized on app launch. Resolving copy & paste ... (diff) | |
parent | Fix linting issues (diff) | |
download | ferdium-app-8b648553a115ed753f78bb81af2752eadaf47754.tar.gz ferdium-app-8b648553a115ed753f78bb81af2752eadaf47754.tar.zst ferdium-app-8b648553a115ed753f78bb81af2752eadaf47754.zip |
Merge branch 'update/monetization' into develop
Diffstat (limited to 'src/electron/ipc-api')
-rw-r--r-- | src/electron/ipc-api/appIndicator.js | 2 | ||||
-rw-r--r-- | src/electron/ipc-api/settings.js | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/electron/ipc-api/appIndicator.js b/src/electron/ipc-api/appIndicator.js index d31819068..e568bf35d 100644 --- a/src/electron/ipc-api/appIndicator.js +++ b/src/electron/ipc-api/appIndicator.js | |||
@@ -15,7 +15,7 @@ function getAsset(type, asset) { | |||
15 | 15 | ||
16 | export default (params) => { | 16 | export default (params) => { |
17 | autorun(() => { | 17 | autorun(() => { |
18 | isTrayIconEnabled = params.settings.get('enableSystemTray'); | 18 | isTrayIconEnabled = params.settings.app.get('enableSystemTray'); |
19 | 19 | ||
20 | if (!isTrayIconEnabled) { | 20 | if (!isTrayIconEnabled) { |
21 | params.trayIcon.hide(); | 21 | params.trayIcon.hide(); |
diff --git a/src/electron/ipc-api/settings.js b/src/electron/ipc-api/settings.js index 3eab68a91..ce006bb92 100644 --- a/src/electron/ipc-api/settings.js +++ b/src/electron/ipc-api/settings.js | |||
@@ -1,11 +1,15 @@ | |||
1 | import { ipcMain } from 'electron'; | 1 | import { ipcMain } from 'electron'; |
2 | 2 | ||
3 | export default (params) => { | 3 | export default (params) => { |
4 | ipcMain.on('getAppSettings', () => { | 4 | ipcMain.on('getAppSettings', (event, type) => { |
5 | params.mainWindow.webContents.send('appSettings', params.settings.all); | 5 | console.log('getAppSettings', type, params.settings[type].all); |
6 | params.mainWindow.webContents.send('appSettings', { | ||
7 | type, | ||
8 | data: params.settings[type].all, | ||
9 | }); | ||
6 | }); | 10 | }); |
7 | 11 | ||
8 | ipcMain.on('updateAppSettings', (event, args) => { | 12 | ipcMain.on('updateAppSettings', (event, args) => { |
9 | params.settings.set(args); | 13 | params.settings[args.type].set(args.data); |
10 | }); | 14 | }); |
11 | }; | 15 | }; |