refactor(tv): remove auto-scroll behaviors from search and series

This commit is contained in:
Fredrik Burmester
2026-02-01 12:44:36 +01:00
parent 25ec9c4348
commit 4962f2161f
2 changed files with 2 additions and 8 deletions

View File

@@ -41,11 +41,8 @@ export const TVSearchSection: React.FC<TVSearchSectionProps> = ({
const [focusedCount, setFocusedCount] = useState(0);
const prevFocusedCount = useRef(0);
// When section loses all focus, scroll back to start
// Track focus count for section
useEffect(() => {
if (prevFocusedCount.current > 0 && focusedCount === 0) {
flatListRef.current?.scrollToOffset({ offset: 0, animated: true });
}
prevFocusedCount.current = focusedCount;
}, [focusedCount]);

View File

@@ -252,11 +252,8 @@ export const TVSeriesPage: React.FC<TVSeriesPageProps> = ({
const [focusedCount, setFocusedCount] = useState(0);
const prevFocusedCount = useRef(0);
// Scroll back to start when episode list loses focus
// Track focus count for episode list
useEffect(() => {
if (prevFocusedCount.current > 0 && focusedCount === 0) {
episodeListRef.current?.scrollTo({ x: 0, animated: true });
}
prevFocusedCount.current = focusedCount;
}, [focusedCount]);