fix hover trailers toggle - suppress cached video key when pref disabled

This commit is contained in:
2026-04-04 11:49:14 +03:00
parent 42fa705037
commit ff9223ad95
+5 -2
View File
@@ -60,8 +60,11 @@ export function useHoverTrailer(
return pickPriority(a.type) - pickPriority(b.type)
})[0]
// If the feature is disabled, suppress the key even when cached data
// exists from a previous session. Otherwise PosterCard will mount the
// iframe the moment the user hovers.
return {
videoKey: trailer?.key || null,
ready: armed && (movieQ.isFetched || tvQ.isFetched),
videoKey: enabled && armed && trailer?.key ? trailer.key : null,
ready: enabled && armed && (movieQ.isFetched || tvQ.isFetched),
}
}