summaryrefslogtreecommitdiffstats
path: root/src/features/todos/store.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/features/todos/store.js')
-rw-r--r--src/features/todos/store.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/features/todos/store.js b/src/features/todos/store.js
index 5c6abff4c..aebe0dcbe 100644
--- a/src/features/todos/store.js
+++ b/src/features/todos/store.js
@@ -61,6 +61,7 @@ export default class TodoStore extends FeatureStore {
61 61
62 this._allReactions = createReactions([ 62 this._allReactions = createReactions([
63 this._setFeatureEnabledReaction, 63 this._setFeatureEnabledReaction,
64 this._updateTodosConfig,
64 this._firstLaunchReaction, 65 this._firstLaunchReaction,
65 ]); 66 ]);
66 67
@@ -124,11 +125,16 @@ export default class TodoStore extends FeatureStore {
124 // Todos client message handlers 125 // Todos client message handlers
125 126
126 _onTodosClientInitialized = () => { 127 _onTodosClientInitialized = () => {
128 const { authToken } = this.stores.user;
129 const { isDarkThemeActive } = this.stores.ui;
130 const { locale } = this.stores.app;
131 if (!this.webview) return;
127 this.webview.send(IPC.TODOS_HOST_CHANNEL, { 132 this.webview.send(IPC.TODOS_HOST_CHANNEL, {
128 action: 'todos:configure', 133 action: 'todos:configure',
129 data: { 134 data: {
130 authToken: this.stores.user.authToken, 135 authToken,
131 theme: this.stores.ui.isDarkThemeActive ? ThemeType.dark : ThemeType.default, 136 locale,
137 theme: isDarkThemeActive ? ThemeType.dark : ThemeType.default,
132 }, 138 },
133 }); 139 });
134 }; 140 };
@@ -148,6 +154,11 @@ export default class TodoStore extends FeatureStore {
148 this.isFeatureEnabled = isTodosEnabled; 154 this.isFeatureEnabled = isTodosEnabled;
149 }; 155 };
150 156
157 _updateTodosConfig = () => {
158 // Resend the config if any part changes in Franz:
159 this._onTodosClientInitialized();
160 };
161
151 _firstLaunchReaction = () => { 162 _firstLaunchReaction = () => {
152 const { stats } = this.stores.settings.all; 163 const { stats } = this.stores.settings.all;
153 164