aboutsummaryrefslogtreecommitdiffstats
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 56e117c6c..170408ebb 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 ]); 65 ]);
65 66
66 this._registerReactions(this._allReactions); 67 this._registerReactions(this._allReactions);
@@ -123,11 +124,16 @@ export default class TodoStore extends FeatureStore {
123 // Todos client message handlers 124 // Todos client message handlers
124 125
125 _onTodosClientInitialized = () => { 126 _onTodosClientInitialized = () => {
127 const { authToken } = this.stores.user;
128 const { isDarkThemeActive } = this.stores.ui;
129 const { locale } = this.stores.app;
130 if (!this.webview) return;
126 this.webview.send(IPC.TODOS_HOST_CHANNEL, { 131 this.webview.send(IPC.TODOS_HOST_CHANNEL, {
127 action: 'todos:configure', 132 action: 'todos:configure',
128 data: { 133 data: {
129 authToken: this.stores.user.authToken, 134 authToken,
130 theme: this.stores.ui.isDarkThemeActive ? ThemeType.dark : ThemeType.default, 135 locale,
136 theme: isDarkThemeActive ? ThemeType.dark : ThemeType.default,
131 }, 137 },
132 }); 138 });
133 }; 139 };
@@ -146,4 +152,9 @@ export default class TodoStore extends FeatureStore {
146 152
147 this.isFeatureEnabled = isTodosEnabled; 153 this.isFeatureEnabled = isTodosEnabled;
148 }; 154 };
155
156 _updateTodosConfig = () => {
157 // Resend the config if any part changes in Franz:
158 this._onTodosClientInitialized();
159 }
149} 160}