mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-06 13:14:11 +00:00
fix(clients): refresh summary counts after a client mutation
The summary card derived active/bucket counts from the live client_stats snapshot, which only refreshed on the next traffic broadcast (up to 5s). A removal therefore left the counts stale while only total tracked the refetched server summary. Clear the snapshot in invalidateAll so the card falls back to the authoritative server summary immediately; the next stats event repopulates it for live tracking.
This commit is contained in:
parent
b9cbc0c1e8
commit
44a8c94108
1 changed files with 1 additions and 0 deletions
|
|
@ -264,6 +264,7 @@ export function useClients() {
|
||||||
const invalidateAll = useCallback(
|
const invalidateAll = useCallback(
|
||||||
() => {
|
() => {
|
||||||
markLocalInvalidate();
|
markLocalInvalidate();
|
||||||
|
setAllClientStats([]);
|
||||||
return Promise.all([
|
return Promise.all([
|
||||||
queryClient.invalidateQueries({ queryKey: keys.clients.root() }),
|
queryClient.invalidateQueries({ queryKey: keys.clients.root() }),
|
||||||
queryClient.invalidateQueries({ queryKey: keys.inbounds.root() }),
|
queryClient.invalidateQueries({ queryKey: keys.inbounds.root() }),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue