aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/settingsWS/index.js
diff options
context:
space:
mode:
authorLibravatar Markus Hatvan <markus_hatvan@aon.at>2021-10-02 09:24:32 +0200
committerLibravatar GitHub <noreply@github.com>2021-10-02 09:24:32 +0200
commitbfe8847d72cd0893230f2e654242658214943e61 (patch)
tree3384b02ebad7a74cbb106ddd95546e0e24ff0bb8 /src/features/settingsWS/index.js
parentfix: Fix navigation shortcut accelerator for non-macos (fixes #1172) (#2012) (diff)
downloadferdium-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-xsrc/features/settingsWS/index.js27
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 @@
1import { reaction } from 'mobx';
2import { SettingsWSStore } from './store';
3
4const debug = require('debug')('Ferdi:feature:settingsWS');
5
6export const settingsStore = new SettingsWSStore();
7
8export 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}