diff options
author | 2019-09-04 16:33:32 +0200 | |
---|---|---|
committer | 2019-09-04 16:33:32 +0200 | |
commit | 9183e15ea2ebe2aa6b06d812de0e7e275d154926 (patch) | |
tree | 2414176a02db1bfbce2676153d50ae2c84499841 /src/features/todos/store.js | |
parent | don't warn on react/destructuring-assignment (diff) | |
parent | Add locale to todos config (diff) | |
download | ferdium-app-9183e15ea2ebe2aa6b06d812de0e7e275d154926.tar.gz ferdium-app-9183e15ea2ebe2aa6b06d812de0e7e275d154926.tar.zst ferdium-app-9183e15ea2ebe2aa6b06d812de0e7e275d154926.zip |
Merge branch 'feature/todos' into develop
Diffstat (limited to 'src/features/todos/store.js')
-rw-r--r-- | src/features/todos/store.js | 15 |
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 | } |