Include unsubmitted in active segment label

This commit is contained in:
Ajay
2022-02-23 01:12:19 -05:00
parent ea91701430
commit 2b811c5ab4
2 changed files with 4 additions and 3 deletions

View File

@@ -552,9 +552,10 @@ class PreviewBar {
}
}
updateChapterText(segments: SponsorTime[], currentTime: number): void {
updateChapterText(segments: SponsorTime[], submittingSegments: SponsorTime[], currentTime: number): void {
if (!segments) return;
if (submittingSegments?.length > 0) segments = segments.concat(submittingSegments);
const activeSegments = segments.filter((segment) => {
return segment.segment[0] <= currentTime && segment.segment[1] > currentTime;
});