diff options
author | Mahadevan Sreenivasan <mahadevan_sv@yahoo.com> | 2020-04-10 12:41:22 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-10 08:11:22 +0100 |
commit | 212f29c5d7ce15cf205adcd17063258b0be306ff (patch) | |
tree | 9ef4406d57243675892f2bced4b4a87d229627e5 /src/stores/AppStore.js | |
parent | Minor spelling fixes in README (#552) (diff) | |
download | ferdium-app-212f29c5d7ce15cf205adcd17063258b0be306ff.tar.gz ferdium-app-212f29c5d7ce15cf205adcd17063258b0be306ff.tar.zst ferdium-app-212f29c5d7ce15cf205adcd17063258b0be306ff.zip |
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.
Diffstat (limited to 'src/stores/AppStore.js')
-rw-r--r-- | src/stores/AppStore.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index 593bf341e..c8adb9c3c 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js | |||
@@ -179,6 +179,10 @@ export default class AppStore extends Store { | |||
179 | this.stores.router.push(url); | 179 | this.stores.router.push(url); |
180 | }); | 180 | }); |
181 | 181 | ||
182 | ipcRenderer.on('muteApp', () => { | ||
183 | this._toggleMuteApp(); | ||
184 | }); | ||
185 | |||
182 | this.locale = this._getDefaultLocale(); | 186 | this.locale = this._getDefaultLocale(); |
183 | 187 | ||
184 | setTimeout(() => { | 188 | setTimeout(() => { |