mirror of
https://github.com/Mail-0/Zero.git
synced 2026-06-29 15:26:42 +00:00
fix: ensure thread refetching only occurs when threadId is available
This commit is contained in:
@@ -154,10 +154,10 @@ export function AIChat() {
|
||||
const refetchAll = useCallback(() => {
|
||||
refetchLabels();
|
||||
refetchStats();
|
||||
refetchThread();
|
||||
if (threadId) refetchThread();
|
||||
queryClient.invalidateQueries({ queryKey: trpc.mail.get.queryKey() });
|
||||
refetch();
|
||||
}, [refetchLabels, refetchStats, refetchThread, queryClient, trpc.mail.get.queryKey]);
|
||||
}, [threadId, queryClient, trpc.mail.get.queryKey]);
|
||||
|
||||
useEffect(() => {
|
||||
if (prevStatusRef.current === 'streaming' && status === 'ready') {
|
||||
|
||||
Reference in New Issue
Block a user