diff options
author | 2022-08-04 00:12:03 +0100 | |
---|---|---|
committer | 2022-08-03 23:12:03 +0000 | |
commit | c2509e860752e23812bb408e331c02c918aadd54 (patch) | |
tree | b855163ad1bddaaa19c47a9cea2713c6899ea1a5 /src/features/serviceProxy | |
parent | Revert to older working version of 'macos-notification-state' (diff) | |
download | ferdium-app-c2509e860752e23812bb408e331c02c918aadd54.tar.gz ferdium-app-c2509e860752e23812bb408e331c02c918aadd54.tar.zst ferdium-app-c2509e860752e23812bb408e331c02c918aadd54.zip |
chore: change values inside mobx actions to fix console warnings (#532)
Diffstat (limited to 'src/features/serviceProxy')
-rw-r--r-- | src/features/serviceProxy/index.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/features/serviceProxy/index.ts b/src/features/serviceProxy/index.ts index 51e67feca..eb3b89ece 100644 --- a/src/features/serviceProxy/index.ts +++ b/src/features/serviceProxy/index.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { autorun, observable } from 'mobx'; | 1 | import { autorun, action, observable } from 'mobx'; |
2 | import { session } from '@electron/remote'; | 2 | import { session } from '@electron/remote'; |
3 | 3 | ||
4 | const debug = require('../../preload-safe-debug')( | 4 | const debug = require('../../preload-safe-debug')( |
@@ -15,8 +15,12 @@ export default function init(stores: { | |||
15 | }) { | 15 | }) { |
16 | debug('Initializing `serviceProxy` feature'); | 16 | debug('Initializing `serviceProxy` feature'); |
17 | 17 | ||
18 | const setIsEnabled = action((value: boolean) => { | ||
19 | config.isEnabled = value; | ||
20 | }); | ||
21 | |||
18 | autorun(() => { | 22 | autorun(() => { |
19 | config.isEnabled = true; | 23 | setIsEnabled(true); |
20 | 24 | ||
21 | const services = stores.services.enabled; | 25 | const services = stores.services.enabled; |
22 | const proxySettings = stores.settings.proxy; | 26 | const proxySettings = stores.settings.proxy; |