From aeddc8eb1da3f957aff4ef476435e834367c463b Mon Sep 17 00:00:00 2001 From: "maze.y2b@gmail.com" Date: Sun, 21 Nov 2021 16:57:22 +0800 Subject: [PATCH] fix proxies callback --- hub/route/proxies.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hub/route/proxies.go b/hub/route/proxies.go index 6b9f7c70..5cb084f9 100644 --- a/hub/route/proxies.go +++ b/hub/route/proxies.go @@ -97,6 +97,10 @@ func updateProxy(w http.ResponseWriter, r *http.Request) { } cachefile.Cache().SetSelected(proxy.Name(), req.Name) + if SwitchProxiesCallback != nil { + // refresh tray menu + go SwitchProxiesCallback(proxy.Name(), req.Name) + } render.NoContent(w, r) }