mirror of
https://github.com/Mail-0/Zero.git
synced 2026-06-30 07:46:15 +00:00
refactor: update debouncer functions to invalidate queries for labels and threads
This commit is contained in:
@@ -24,8 +24,14 @@ export const NotificationProvider = ({ headers }: { headers: Record<string, stri
|
||||
// await refetchThreads();
|
||||
// }, [refetchThreads]);
|
||||
|
||||
const labelsDebouncer = funnel(refetchLabels, { minQuietPeriodMs: DEBOUNCE_DELAY });
|
||||
const threadsDebouncer = funnel(refetchThreads, { minQuietPeriodMs: DEBOUNCE_DELAY });
|
||||
const labelsDebouncer = funnel(
|
||||
() => queryClient.invalidateQueries({ queryKey: trpc.labels.list.queryKey() }),
|
||||
{ minQuietPeriodMs: DEBOUNCE_DELAY },
|
||||
);
|
||||
const threadsDebouncer = funnel(
|
||||
() => queryClient.invalidateQueries({ queryKey: trpc.mail.listThreads.queryKey() }),
|
||||
{ minQuietPeriodMs: DEBOUNCE_DELAY },
|
||||
);
|
||||
|
||||
usePartySocket({
|
||||
party: 'durable-mailbox',
|
||||
|
||||
Reference in New Issue
Block a user