From 734994866bea8ff97f5888c696e118c2dec7d0b0 Mon Sep 17 00:00:00 2001 From: Nikolay Arhipov Date: Mon, 18 Mar 2024 18:13:07 +0200 Subject: [PATCH] fix: flicker when region starts at 0:00 --- src/Components/Control/Regions.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Components/Control/Regions.tsx b/src/Components/Control/Regions.tsx index fa8a9e0..9b1af50 100644 --- a/src/Components/Control/Regions.tsx +++ b/src/Components/Control/Regions.tsx @@ -119,7 +119,8 @@ function RegionList() { const isPlaying = createSelector( currentTime, (r: Region, { seconds: t }) => - t >= Math.floor(r.startTime) && t <= Math.ceil(r.endTime), + Math.max(t, 0) >= Math.floor(r.startTime) && + Math.max(t, 0) <= Math.ceil(r.endTime), ); const processedRegions = createMemo(() =>