refs #982 Reload proxy configuration after changed

This commit is contained in:
AkiraFukushima 2019-10-29 00:00:19 +09:00
parent 2c8af191a4
commit 1f6bcdfdf6
1 changed files with 7 additions and 1 deletions

View File

@ -122,11 +122,17 @@ const actions: ActionTree<NetworkState, RootState> = {
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)
}
}