diff options
author | 2019-09-24 10:55:15 +0700 | |
---|---|---|
committer | 2019-09-24 10:55:15 +0700 | |
commit | d88b04b05b64b6fea38e226c3bf344f58c2ceefb (patch) | |
tree | 37d0453f258414f483c2ce27623b12de6ce1b09f /src/stores | |
parent | Trigger pull request build after replugging Travis (diff) | |
parent | Add darkreader to feature list and changelog (diff) | |
download | ferdium-app-d88b04b05b64b6fea38e226c3bf344f58c2ceefb.tar.gz ferdium-app-d88b04b05b64b6fea38e226c3bf344f58c2ceefb.tar.zst ferdium-app-d88b04b05b64b6fea38e226c3bf344f58c2ceefb.zip |
Merge branch 'master' into feat/macos-signing
Diffstat (limited to 'src/stores')
-rw-r--r-- | src/stores/FeaturesStore.js | 2 | ||||
-rw-r--r-- | src/stores/ServicesStore.js | 18 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/stores/FeaturesStore.js b/src/stores/FeaturesStore.js index cf28b6bec..c39b6d7f3 100644 --- a/src/stores/FeaturesStore.js +++ b/src/stores/FeaturesStore.js | |||
@@ -13,6 +13,7 @@ import spellchecker from '../features/spellchecker'; | |||
13 | import serviceProxy from '../features/serviceProxy'; | 13 | import serviceProxy from '../features/serviceProxy'; |
14 | import basicAuth from '../features/basicAuth'; | 14 | import basicAuth from '../features/basicAuth'; |
15 | import workspaces from '../features/workspaces'; | 15 | import workspaces from '../features/workspaces'; |
16 | import quickSwitch from '../features/quickSwitch'; | ||
16 | import shareFranz from '../features/shareFranz'; | 17 | import shareFranz from '../features/shareFranz'; |
17 | import announcements from '../features/announcements'; | 18 | import announcements from '../features/announcements'; |
18 | import settingsWS from '../features/settingsWS'; | 19 | import settingsWS from '../features/settingsWS'; |
@@ -75,6 +76,7 @@ export default class FeaturesStore extends Store { | |||
75 | serviceProxy(this.stores, this.actions); | 76 | serviceProxy(this.stores, this.actions); |
76 | basicAuth(this.stores, this.actions); | 77 | basicAuth(this.stores, this.actions); |
77 | workspaces(this.stores, this.actions); | 78 | workspaces(this.stores, this.actions); |
79 | quickSwitch(this.stores, this.actions); | ||
78 | shareFranz(this.stores, this.actions); | 80 | shareFranz(this.stores, this.actions); |
79 | announcements(this.stores, this.actions); | 81 | announcements(this.stores, this.actions); |
80 | settingsWS(this.stores, this.actions); | 82 | settingsWS(this.stores, this.actions); |
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index f88b14983..3173004d4 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js | |||
@@ -11,6 +11,7 @@ import Store from './lib/Store'; | |||
11 | import Request from './lib/Request'; | 11 | import Request from './lib/Request'; |
12 | import CachedRequest from './lib/CachedRequest'; | 12 | import CachedRequest from './lib/CachedRequest'; |
13 | import { matchRoute } from '../helpers/routing-helpers'; | 13 | import { matchRoute } from '../helpers/routing-helpers'; |
14 | import { isInTimeframe } from '../helpers/schedule-helpers'; | ||
14 | import { workspaceStore } from '../features/workspaces'; | 15 | import { workspaceStore } from '../features/workspaces'; |
15 | import { serviceLimitStore } from '../features/serviceLimit'; | 16 | import { serviceLimitStore } from '../features/serviceLimit'; |
16 | import { RESTRICTION_TYPES } from '../models/Service'; | 17 | import { RESTRICTION_TYPES } from '../models/Service'; |
@@ -95,6 +96,11 @@ export default class ServicesStore extends Store { | |||
95 | () => this.stores.settings.app.spellcheckerLanguage, | 96 | () => this.stores.settings.app.spellcheckerLanguage, |
96 | () => this._shareSettingsWithServiceProcess(), | 97 | () => this._shareSettingsWithServiceProcess(), |
97 | ); | 98 | ); |
99 | |||
100 | reaction( | ||
101 | () => this.stores.settings.app.darkMode, | ||
102 | () => this._shareSettingsWithServiceProcess(), | ||
103 | ); | ||
98 | } | 104 | } |
99 | 105 | ||
100 | @computed get all() { | 106 | @computed get all() { |
@@ -422,6 +428,18 @@ export default class ServicesStore extends Store { | |||
422 | }); | 428 | }); |
423 | } else if (channel === 'notification') { | 429 | } else if (channel === 'notification') { |
424 | const { options } = args[0]; | 430 | const { options } = args[0]; |
431 | |||
432 | // Check if we are in scheduled Do-not-Disturb time | ||
433 | const { | ||
434 | scheduledDNDEnabled, | ||
435 | scheduledDNDStart, | ||
436 | scheduledDNDEnd, | ||
437 | } = this.stores.settings.all.app; | ||
438 | |||
439 | if (scheduledDNDEnabled && isInTimeframe(scheduledDNDStart, scheduledDNDEnd)) { | ||
440 | return; | ||
441 | } | ||
442 | |||
425 | if (service.recipe.hasNotificationSound || service.isMuted || this.stores.settings.all.app.isAppMuted) { | 443 | if (service.recipe.hasNotificationSound || service.isMuted || this.stores.settings.all.app.isAppMuted) { |
426 | Object.assign(options, { | 444 | Object.assign(options, { |
427 | silent: true, | 445 | silent: true, |