From af9f722b53fc7f30019d68ec39e813ee157760ca Mon Sep 17 00:00:00 2001 From: Alex Kim Date: Mon, 14 Oct 2024 19:24:13 +1100 Subject: [PATCH] Removed duplicate Invalidate queries for next-up --- app/(auth)/play-video.tsx | 5 +---- components/PlayedStatus.tsx | 3 --- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/app/(auth)/play-video.tsx b/app/(auth)/play-video.tsx index 89502154..48c1dfac 100644 --- a/app/(auth)/play-video.tsx +++ b/app/(auth)/play-video.tsx @@ -130,16 +130,13 @@ export default function page() { queryClient.invalidateQueries({ queryKey: ["seasons"], }); - queryClient.invalidateQueries({ - queryKey: ["nextUp-all"], - }); queryClient.invalidateQueries({ queryKey: ["home"], }); setIsPlaybackStopped(true); videoRef.current?.pause(); reportPlaybackStopped(); - }, [videoRef]); + }, [queryClient, videoRef]); const reportPlaybackStopped = async () => { await getPlaystateApi(api).onPlaybackStopped({ diff --git a/components/PlayedStatus.tsx b/components/PlayedStatus.tsx index 82e9057d..0d483858 100644 --- a/components/PlayedStatus.tsx +++ b/components/PlayedStatus.tsx @@ -41,9 +41,6 @@ export const PlayedStatus: React.FC = ({ item, ...props }) => { queryClient.invalidateQueries({ queryKey: ["seasons"], }); - queryClient.invalidateQueries({ - queryKey: ["nextUp-all"], - }); queryClient.invalidateQueries({ queryKey: ["home"], });