fix(studio movies): osobny klucz cache dla listy nieskonczonej, kolizja z useQuery w StudioScenes wywalala pages.length (Sentry 140915208)

- changelog 2026-09-08a, OTA 15f8e545 na 1.3
This commit is contained in:
goon-foss 2026-09-08 09:53:20 +02:00
parent b0350baff0
commit 44842478ae
2 changed files with 12 additions and 1 deletions

View file

@ -29,6 +29,13 @@ export type ChangelogEntry = {
};
export const CHANGELOG: ChangelogEntry[] = [
{
id: '2026-09-08a',
date: 'September 2026',
items: [
'Fixed a crash when opening a studio\'s movie list right after browsing that studio\'s Movies tab. The two screens were sharing a cache entry with different shapes.',
],
},
{
id: '2026-09-07h',
date: 'September 2026',

View file

@ -68,7 +68,11 @@ export function StudioMoviesScreen() {
hasNextPage,
isFetchingNextPage,
} = useInfiniteQuery({
queryKey: ['studio-movies', slug],
// NIE ['studio-movies', slug]: ten klucz ma zwykle useQuery w StudioScenesScreen
// (zakladka Movies) i trzyma tam {items,...} bez `pages`. Po przejsciu StudioScenes ->
// MovieDetail -> studio ta infinite query dostawala z cache cudzy ksztalt i react-query
// wywalal sie na `pages.length` (Sentry 140915208, 6 osob, od 2026-08-16).
queryKey: ['studio-movies-pages', slug],
queryFn: ({ pageParam = 1 }) =>
client.listMovies({
studio_slugs: [slug],