From a1f47026472023cb19edcec41adb256588196458 Mon Sep 17 00:00:00 2001 From: tapframe Date: Thu, 8 Jan 2026 00:31:33 +0530 Subject: [PATCH] reanimated warnings: Fixed by removing the direct .value read in SkipIntroButton --- .../player/overlays/SkipIntroButton.tsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/player/overlays/SkipIntroButton.tsx b/src/components/player/overlays/SkipIntroButton.tsx index 580e9d2..663d86d 100644 --- a/src/components/player/overlays/SkipIntroButton.tsx +++ b/src/components/player/overlays/SkipIntroButton.tsx @@ -41,14 +41,14 @@ export const SkipIntroButton: React.FC = ({ }) => { const { currentTheme } = useTheme(); const insets = useSafeAreaInsets(); - + // State const [skipIntervals, setSkipIntervals] = useState([]); const [currentInterval, setCurrentInterval] = useState(null); const [isVisible, setIsVisible] = useState(false); const [hasSkippedCurrent, setHasSkippedCurrent] = useState(false); const [autoHidden, setAutoHidden] = useState(false); - + // Refs const fetchedRef = useRef(false); const lastEpisodeRef = useRef(''); @@ -115,8 +115,8 @@ export const SkipIntroButton: React.FC = ({ if (active) { // If we found a new active interval that is different from the previous one - if (!currentInterval || - active.startTime !== currentInterval.startTime || + if (!currentInterval || + active.startTime !== currentInterval.startTime || active.type !== currentInterval.type) { logger.log(`[SkipIntroButton] Entering interval: ${active.type} (${active.startTime}-${active.endTime})`); setCurrentInterval(active); @@ -135,10 +135,10 @@ export const SkipIntroButton: React.FC = ({ // Determine if button should show const shouldShowButton = useCallback(() => { if (!currentInterval || hasSkippedCurrent) return false; - + // If auto-hidden, only show when controls are visible if (autoHidden && !controlsVisible) return false; - + return true; }, [currentInterval, hasSkippedCurrent, autoHidden, controlsVisible]); @@ -205,7 +205,7 @@ export const SkipIntroButton: React.FC = ({ // Get display text based on skip type const getButtonText = () => { if (!currentInterval) return 'Skip'; - + switch (currentInterval.type) { case 'op': case 'mixed-op': @@ -228,8 +228,8 @@ export const SkipIntroButton: React.FC = ({ transform: [{ scale: scale.value }, { translateY: translateY.value }], })); - // Don't render if not visible (and animation complete) - if (!isVisible && opacity.value === 0) { + // Don't render if not visible + if (!isVisible) { return null; }