mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 09:07:45 +01:00
Don't show hidden segments in active segment box
This commit is contained in:
parent
32ff8db241
commit
b14d766ffb
1 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue