From 251106bcb0a0bf8b30b61123e945eb4e4ea3c157 Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Thu, 6 Nov 2025 16:31:19 +0800 Subject: [PATCH] don't enforce playback mode when not playing --- src/renderer/src/App.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/App.tsx b/src/renderer/src/App.tsx index 3ba92684..d5fd1184 100644 --- a/src/renderer/src/App.tsx +++ b/src/renderer/src/App.tsx @@ -746,7 +746,7 @@ function App() { const firstSegmentAtCursorIndex = segmentsAtCursorIndexes[0]; const playingSegment = firstSegmentAtCursorIndex != null ? cutSegments[firstSegmentAtCursorIndex] : undefined; - if (playbackModeRef.current != null && playingSegment && playingSegment.end != null) { // todo and is currently playing? + if (playbackModeRef.current != null && playingRef.current && playingSegment && playingSegment.end != null) { // todo and is currently playing? const nextAction = getPlaybackAction({ playbackMode: playbackModeRef.current, currentTime, playingSegment: { start: playingSegment.start, end: playingSegment.end } }); const exit = () => { @@ -780,7 +780,7 @@ function App() { } } } - }, [commandedTimeRef, cutSegments, findSegmentsAtCursor, pause, playbackModeRef, playerTime, seekAbs, selectedSegments, setCurrentSegIndex, setPlaybackMode, setPlayerTime]); + }, [commandedTimeRef, cutSegments, findSegmentsAtCursor, pause, playbackModeRef, playerTime, playingRef, seekAbs, selectedSegments, setCurrentSegIndex, setPlaybackMode, setPlayerTime]); const closeFileWithConfirm = useCallback(() => { if (!isFileOpened || workingRef.current) return;