higher the update rate of the chat
This commit is contained in:
@@ -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,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user