Don't show unsubmitted segments in description box

This commit is contained in:
Ajay
2022-09-18 16:02:52 -04:00
parent 614d6a722a
commit 4970d33169
3 changed files with 7 additions and 5 deletions

View File

@@ -9,7 +9,7 @@ import Config from "../config";
import { ChapterVote } from "../render/ChapterVote";
import { ActionType, Category, SegmentContainer, SponsorHideType, SponsorSourceType, SponsorTime } from "../types";
import { partition } from "../utils/arrayUtils";
import { shortCategoryName } from "../utils/categoryUtils";
import { DEFAULT_CATEGORY, shortCategoryName } from "../utils/categoryUtils";
import { GenericUtils } from "../utils/genericUtils";
import { findValidElement } from "../utils/pageUtils";
@@ -708,7 +708,8 @@ class PreviewBar {
if (submittingSegments?.length > 0) segments = segments.concat(submittingSegments);
const activeSegments = segments.filter((segment) => {
return segment.hidden === SponsorHideType.Visible
&& segment.segment[0] <= currentTime && segment.segment[1] > currentTime;
&& segment.segment[0] <= currentTime && segment.segment[1] > currentTime
&& segment.category !== DEFAULT_CATEGORY;
});
this.setActiveSegments(activeSegments);