From c565e2199d0b1c5188ef2080b8906d3028ba3aa9 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Fri, 3 Mar 2023 09:28:10 -0800 Subject: [PATCH] IO-2195 Add additional check for conversation query. --- client/src/components/chat-popup/chat-popup.component.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/components/chat-popup/chat-popup.component.jsx b/client/src/components/chat-popup/chat-popup.component.jsx index 5466f43e2..9a4dc33eb 100644 --- a/client/src/components/chat-popup/chat-popup.component.jsx +++ b/client/src/components/chat-popup/chat-popup.component.jsx @@ -50,7 +50,8 @@ export function ChatPopupComponent({ const { loading, data, refetch, called } = useQuery(CONVERSATION_LIST_QUERY, { fetchPolicy: "network-only", nextFetchPolicy: "network-only", - ...(pollInterval > 0 && chatVisible ? { pollInterval } : {}), + skip: !chatVisible, + ...(pollInterval > 0 ? { pollInterval } : {}), }); const fcmToken = sessionStorage.getItem("fcmtoken");