diff options
author | 2021-10-02 09:24:32 +0200 | |
---|---|---|
committer | 2021-10-02 09:24:32 +0200 | |
commit | bfe8847d72cd0893230f2e654242658214943e61 (patch) | |
tree | 3384b02ebad7a74cbb106ddd95546e0e24ff0bb8 /src/features/settingsWS/index.js | |
parent | fix: Fix navigation shortcut accelerator for non-macos (fixes #1172) (#2012) (diff) | |
download | ferdium-app-bfe8847d72cd0893230f2e654242658214943e61.tar.gz ferdium-app-bfe8847d72cd0893230f2e654242658214943e61.tar.zst ferdium-app-bfe8847d72cd0893230f2e654242658214943e61.zip |
chore: convert various files from JS to TS (#2010)
Diffstat (limited to 'src/features/settingsWS/index.js')
-rwxr-xr-x | src/features/settingsWS/index.js | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/features/settingsWS/index.js b/src/features/settingsWS/index.js deleted file mode 100755 index 7771421d6..000000000 --- a/src/features/settingsWS/index.js +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | import { reaction } from 'mobx'; | ||
2 | import { SettingsWSStore } from './store'; | ||
3 | |||
4 | const debug = require('debug')('Ferdi:feature:settingsWS'); | ||
5 | |||
6 | export const settingsStore = new SettingsWSStore(); | ||
7 | |||
8 | export default function initSettingsWebSocket(stores, actions) { | ||
9 | const { features } = stores; | ||
10 | |||
11 | // Toggle SettingsWebSocket feature | ||
12 | reaction( | ||
13 | () => ( | ||
14 | features.features.isSettingsWSEnabled | ||
15 | ), | ||
16 | (isEnabled) => { | ||
17 | if (isEnabled) { | ||
18 | debug('Initializing `settingsWS` feature'); | ||
19 | settingsStore.start(stores, actions); | ||
20 | } else if (settingsStore) { | ||
21 | debug('Disabling `settingsWS` feature'); | ||
22 | settingsStore.stop(); | ||
23 | } | ||
24 | }, | ||
25 | { fireImmediately: true }, | ||
26 | ); | ||
27 | } | ||