IO-2195 Add additional check for conversation query.

This commit is contained in:
Patrick Fic
2023-03-03 09:28:10 -08:00
parent 8fa0946cfa
commit c565e2199d

View File

@@ -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");