mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-03 19:09:36 +00:00
fix(inbounds): refresh routing inbound-tag list after inbound changes
The routing-rule tag picker reads inboundTags from the xray config query (['xray','config']), but refresh() only invalidated the inbounds/clients buckets. So after adding, editing or deleting an inbound the tag list stayed stale until a hard refresh wiped the react-query cache. Invalidate the xray config query too, alongside the existing inbounds-options fix.
This commit is contained in:
@@ -249,11 +249,14 @@ export function useInbounds() {
|
||||
// Invalidate at the inbounds root so both `slim` (this page's list)
|
||||
// and `options` (the Clients page's inbound picker) refetch. Without
|
||||
// the options bucket, a freshly-created inbound stays invisible in
|
||||
// the client add/edit modal until a full page reload.
|
||||
// the client add/edit modal until a full page reload. The xray config
|
||||
// response carries inboundTags for the routing-rule tag picker, so it
|
||||
// needs invalidating too or that list stays stale until a hard refresh.
|
||||
await Promise.all([
|
||||
queryClient.invalidateQueries({ queryKey: keys.inbounds.root() }),
|
||||
queryClient.invalidateQueries({ queryKey: keys.clients.onlines() }),
|
||||
queryClient.invalidateQueries({ queryKey: keys.clients.lastOnline() }),
|
||||
queryClient.invalidateQueries({ queryKey: keys.xray.config() }),
|
||||
]);
|
||||
}, [queryClient]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user