aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/serviceProxy
diff options
context:
space:
mode:
authorLibravatar André Oliveira <37463445+SpecialAro@users.noreply.github.com>2022-08-04 00:12:03 +0100
committerLibravatar GitHub <noreply@github.com>2022-08-03 23:12:03 +0000
commitc2509e860752e23812bb408e331c02c918aadd54 (patch)
treeb855163ad1bddaaa19c47a9cea2713c6899ea1a5 /src/features/serviceProxy
parentRevert to older working version of 'macos-notification-state' (diff)
downloadferdium-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.ts8
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 @@
1import { autorun, observable } from 'mobx'; 1import { autorun, action, observable } from 'mobx';
2import { session } from '@electron/remote'; 2import { session } from '@electron/remote';
3 3
4const debug = require('../../preload-safe-debug')( 4const 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;