mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-08-03 11:01:22 +08:00
fix(ui): invalidate proxy takeover status after profile switch
This commit is contained in:
+4
-1
@@ -382,11 +382,14 @@ function App() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// 托盘应用项目后刷新相关缓存(providers 由既有 provider-switched 监听承接)
|
// 应用项目后刷新相关缓存(providers 由既有 provider-switched 监听承接;
|
||||||
|
// proxy 状态由后端直接改 DB,不走 mutation,必须显式刷新)
|
||||||
useTauriEvent("profile-applied", async () => {
|
useTauriEvent("profile-applied", async () => {
|
||||||
await queryClient.invalidateQueries({ queryKey: ["profiles"] });
|
await queryClient.invalidateQueries({ queryKey: ["profiles"] });
|
||||||
await queryClient.invalidateQueries({ queryKey: ["mcp", "all"] });
|
await queryClient.invalidateQueries({ queryKey: ["mcp", "all"] });
|
||||||
await queryClient.invalidateQueries({ queryKey: ["skills"] });
|
await queryClient.invalidateQueries({ queryKey: ["skills"] });
|
||||||
|
await queryClient.invalidateQueries({ queryKey: ["proxyTakeoverStatus"] });
|
||||||
|
await queryClient.invalidateQueries({ queryKey: ["proxyStatus"] });
|
||||||
});
|
});
|
||||||
|
|
||||||
useTauriEvent<SyncStatusUpdatedPayload | null | undefined>(
|
useTauriEvent<SyncStatusUpdatedPayload | null | undefined>(
|
||||||
|
|||||||
Reference in New Issue
Block a user