From b14d766ffb1f947563a5d9679aadaa73dd52f171 Mon Sep 17 00:00:00 2001 From: Ajay Date: Thu, 18 Aug 2022 02:44:49 -0400 Subject: [PATCH] Don't show hidden segments in active segment box --- src/js-components/previewBar.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/js-components/previewBar.ts b/src/js-components/previewBar.ts index f456f19c..57035e8c 100644 --- a/src/js-components/previewBar.ts +++ b/src/js-components/previewBar.ts @@ -6,7 +6,7 @@ https://github.com/videosegments/videosegments/commits/f1e111bdfe231947800c6efdd 'use strict'; import Config from "../config"; -import { ActionType, Category, SegmentContainer, SponsorSourceType, SponsorTime } from "../types"; +import { ActionType, Category, SegmentContainer, SponsorHideType, SponsorSourceType, SponsorTime } from "../types"; import { partition } from "../utils/arrayUtils"; import { shortCategoryName } from "../utils/categoryUtils"; import { GenericUtils } from "../utils/genericUtils"; @@ -620,7 +620,8 @@ class PreviewBar { segments ??= []; if (submittingSegments?.length > 0) segments = segments.concat(submittingSegments); const activeSegments = segments.filter((segment) => { - return segment.segment[0] <= currentTime && segment.segment[1] > currentTime; + return segment.hidden === SponsorHideType.Visible + && segment.segment[0] <= currentTime && segment.segment[1] > currentTime; }); this.setActiveSegments(activeSegments);