Skip to content

Commit

Permalink
fix(App): App mute now disables notifications as well
Browse files Browse the repository at this point in the history
  • Loading branch information
adlk committed Nov 29, 2017
1 parent 0ca3912 commit 0fa1caf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/components/layout/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ const messages = defineMessages({
defaultMessage: '!!!Add new service',
},
mute: {
id: 'sidebar.mute',
defaultMessage: '!!!Disable audio',
id: 'sidebar.muteApp',
defaultMessage: '!!!Disable notifications & audio',
},
unmute: {
id: 'sidebar.unmute',
defaultMessage: '!!!Enable audio',
id: 'sidebar.unmuteApp',
defaultMessage: '!!!Enable notifications & audio',
},
});

Expand Down
4 changes: 2 additions & 2 deletions src/i18n/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
"infobar.requiredRequestsFailed": "Could not load services and user information",
"sidebar.settings": "Settings",
"sidebar.addNewService": "Add new service",
"sidebar.mute": "Disable audio",
"sidebar.unmute": "Enable audio",
"sidebar.muteApp": "Disable notifications & audio",
"sidebar.unmuteApp": "Enable notifications & audio",
"services.welcome": "Welcome to Franz",
"services.getStarted": "Get started",
"settings.account.headline": "Account",
Expand Down
2 changes: 2 additions & 0 deletions src/stores/AppStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ export default class AppStore extends Store {
// Actions
@action _notify({ title, options, notificationId, serviceId = null }) {
if (this.stores.settings.all.isAppMuted) return;
const notification = new window.Notification(title, options);
notification.onclick = (e) => {
if (serviceId) {
Expand Down

0 comments on commit 0fa1caf

Please sign in to comment.