From aa04ed7bf4262d03fa3f19a788d8bc2f7dea6533 Mon Sep 17 00:00:00 2001 From: felistachio Date: Sat, 20 Sep 2025 20:48:23 -0700 Subject: [PATCH] Fix: prevent auto-switch tab on refresh --- src/popup/SegmentListComponent.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/popup/SegmentListComponent.tsx b/src/popup/SegmentListComponent.tsx index 6e0f62c5..35bf9e7e 100644 --- a/src/popup/SegmentListComponent.tsx +++ b/src/popup/SegmentListComponent.tsx @@ -48,9 +48,7 @@ export const SegmentListComponent = (props: SegmentListComponentProps) => { React.useEffect(() => { const hasSegments = props.segments.find(seg => seg.actionType !== ActionType.Chapter) - if (hasSegments) { - setTab(SegmentListTab.Segments); - } else { + if (!hasSegments && props.segments.length > 0) { setTab(SegmentListTab.Chapter); } }, [props.videoID, props.segments]);