diff options
Diffstat (limited to 'src/stores')
-rw-r--r-- | src/stores/ServicesStore.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index 499495d08..4ccb995ae 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js | |||
@@ -97,6 +97,7 @@ export default class ServicesStore extends Store { | |||
97 | this._toggleNotifications.bind(this), | 97 | this._toggleNotifications.bind(this), |
98 | ); | 98 | ); |
99 | this.actions.service.toggleAudio.listen(this._toggleAudio.bind(this)); | 99 | this.actions.service.toggleAudio.listen(this._toggleAudio.bind(this)); |
100 | this.actions.service.toggleDarkMode.listen(this._toggleDarkMode.bind(this)); | ||
100 | this.actions.service.openDevTools.listen(this._openDevTools.bind(this)); | 101 | this.actions.service.openDevTools.listen(this._openDevTools.bind(this)); |
101 | this.actions.service.openDevToolsForActiveService.listen( | 102 | this.actions.service.openDevToolsForActiveService.listen( |
102 | this._openDevToolsForActiveService.bind(this), | 103 | this._openDevToolsForActiveService.bind(this), |
@@ -916,6 +917,18 @@ export default class ServicesStore extends Store { | |||
916 | }); | 917 | }); |
917 | } | 918 | } |
918 | 919 | ||
920 | @action _toggleDarkMode({ serviceId }) { | ||
921 | const service = this.one(serviceId); | ||
922 | |||
923 | this.actions.service.updateService({ | ||
924 | serviceId, | ||
925 | serviceData: { | ||
926 | isDarkModeEnabled: !service.isDarkModeEnabled, | ||
927 | }, | ||
928 | redirect: false, | ||
929 | }); | ||
930 | } | ||
931 | |||
919 | @action _openDevTools({ serviceId }) { | 932 | @action _openDevTools({ serviceId }) { |
920 | const service = this.one(serviceId); | 933 | const service = this.one(serviceId); |
921 | if (service.isTodosService) { | 934 | if (service.isTodosService) { |