From 212f29c5d7ce15cf205adcd17063258b0be306ff Mon Sep 17 00:00:00 2001 From: Mahadevan Sreenivasan Date: Fri, 10 Apr 2020 12:41:22 +0530 Subject: Add notification & audio toggle action in tray context menu (#542) * feat: Add new tray menu item to enable / disable Notifications and Audio - Use ipcMain to listen to iniital App Settings which determines the current isAppMuted state and display menu item text accordingly - Use ipcMain to listen to updates to App Settings -> isAppMuted from the App Menu / Side Bar and display menu item text accordingly - When the user clicks on the Enable / Disable Notifications & Audio menu item in the Tray, pass a message to the app via window.webContents.send with channel 'muteApp' - In stores/AppStore.js, use an ipcRenderer to toggleMuteApp() - To get the initial app state to the main process, pass a channel 'initialAppSettings' from SettingsStore which the tray class can listen to. * feat - System Tray menu item for Muting App - Fix lint errors * feat: Provide a menu item in the tray bar icon to Mute/Unmute the application - Revert package-lock.json to the previous commit. --- src/stores/SettingsStore.js | 1 + 1 file changed, 1 insertion(+) (limited to 'src/stores/SettingsStore.js') diff --git a/src/stores/SettingsStore.js b/src/stores/SettingsStore.js index 799ba3f5a..227eb2145 100644 --- a/src/stores/SettingsStore.js +++ b/src/stores/SettingsStore.js @@ -110,6 +110,7 @@ export default class SettingsStore extends Store { } debug('Get appSettings resolves', resp.type, resp.data); Object.assign(this._fileSystemSettingsCache[resp.type], resp.data); + ipcRenderer.send('initialAppSettings', resp); }); this.fileSystemSettingsTypes.forEach((type) => { -- cgit v1.2.3-70-g09d2