refs #982 Reload proxy configuration after changed
This commit is contained in:
parent
2c8af191a4
commit
1f6bcdfdf6
|
@ -122,11 +122,17 @@ const actions: ActionTree<NetworkState, RootState> = {
|
||||||
updatePassword: ({ commit }, password: string) => {
|
updatePassword: ({ commit }, password: string) => {
|
||||||
commit(MUTATION_TYPES.UPDATE_PASSWORD, password)
|
commit(MUTATION_TYPES.UPDATE_PASSWORD, password)
|
||||||
},
|
},
|
||||||
saveProxyConfig: ({ state }) => {
|
saveProxyConfig: ({ state, dispatch }) => {
|
||||||
const proxy: Proxy = {
|
const proxy: Proxy = {
|
||||||
source: state.source,
|
source: state.source,
|
||||||
manualProxyConfig: state.proxy
|
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)
|
ipcRenderer.send('update-proxy-config', proxy)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue