Fixed refresh not refetching next-up and continue watching

This commit is contained in:
Alex Kim
2024-11-26 02:54:50 +11:00
parent 44e5436c3b
commit bf0c8a8007

View File

@@ -167,19 +167,11 @@ export default function index() {
setLoading(true); setLoading(true);
await queryClient.invalidateQueries({ await queryClient.invalidateQueries({
queryKey: ["home"], queryKey: ["home"],
refetchType: "all",
type: "all",
exact: false,
});
await queryClient.invalidateQueries({
queryKey: ["home"],
refetchType: "all",
type: "all", type: "all",
exact: false, exact: false,
}); });
await queryClient.invalidateQueries({ await queryClient.invalidateQueries({
queryKey: ["item"], queryKey: ["item"],
refetchType: "all",
type: "all", type: "all",
exact: false, exact: false,
}); });
@@ -240,7 +232,7 @@ export default function index() {
const ss: Section[] = [ const ss: Section[] = [
{ {
title: "Continue Watching", title: "Continue Watching",
queryKey: ["home", "resumeItems", user.Id], queryKey: ["home", "resumeItems"],
queryFn: async () => queryFn: async () =>
( (
await getItemsApi(api).getResumeItems({ await getItemsApi(api).getResumeItems({
@@ -254,7 +246,7 @@ export default function index() {
}, },
{ {
title: "Next Up", title: "Next Up",
queryKey: ["home", "nextUp-all", user?.Id], queryKey: ["home", "nextUp-all"],
queryFn: async () => queryFn: async () =>
( (
await getTvShowsApi(api).getNextUp({ await getTvShowsApi(api).getNextUp({