higher the update rate of the chat

This commit is contained in:
Matthias Hochmeister
2026-03-13 08:16:00 +01:00
parent f309096497
commit 60488309ca

View File

@@ -25,7 +25,7 @@ export const ChatProvider: React.FC<ChatProviderProps> = ({ children }) => {
const { data: connData } = useQuery({ const { data: connData } = useQuery({
queryKey: ['nextcloud', 'connection'], queryKey: ['nextcloud', 'connection'],
queryFn: () => nextcloudApi.getConversations(), queryFn: () => nextcloudApi.getConversations(),
refetchInterval: chatPanelOpen ? 30000 : 120000, refetchInterval: chatPanelOpen ? 5000 : 60000,
retry: false, retry: false,
}); });
@@ -34,7 +34,7 @@ export const ChatProvider: React.FC<ChatProviderProps> = ({ children }) => {
const { data } = useQuery({ const { data } = useQuery({
queryKey: ['nextcloud', 'rooms'], queryKey: ['nextcloud', 'rooms'],
queryFn: () => nextcloudApi.getRooms(), queryFn: () => nextcloudApi.getRooms(),
refetchInterval: chatPanelOpen ? 30000 : 120000, refetchInterval: chatPanelOpen ? 5000 : 60000,
enabled: isConnected, enabled: isConnected,
}); });