From 1f6bcdfdf64aa74453ac6b9c34e7293259520e4f Mon Sep 17 00:00:00 2001
From: AkiraFukushima
Date: Tue, 29 Oct 2019 00:00:19 +0900
Subject: [PATCH] refs #982 Reload proxy configuration after changed
---
src/renderer/store/Preferences/Network.ts | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/renderer/store/Preferences/Network.ts b/src/renderer/store/Preferences/Network.ts
index 0a4a0e9a..854631c4 100644
--- a/src/renderer/store/Preferences/Network.ts
+++ b/src/renderer/store/Preferences/Network.ts
@@ -122,11 +122,17 @@ const actions: ActionTree = {
updatePassword: ({ commit }, password: string) => {
commit(MUTATION_TYPES.UPDATE_PASSWORD, password)
},
- saveProxyConfig: ({ state }) => {
+ saveProxyConfig: ({ state, dispatch }) => {
const proxy: Proxy = {
source: state.source,
manualProxyConfig: state.proxy
}
+ ipcRenderer.once('response-update-proxy-config', async () => {
+ dispatch('App/loadProxy', {}, { root: true })
+ // Originally we have to restart all streamings after user change proxy configuration.
+ // But streamings are restart after close preferences.
+ // So we don't have to restart streaming here.
+ })
ipcRenderer.send('update-proxy-config', proxy)
}
}