From 38e6d5469fc8293fc16ea58015c06f6e7908d855 Mon Sep 17 00:00:00 2001 From: Ajay Date: Wed, 27 Nov 2024 12:56:24 -0500 Subject: [PATCH] Fix chapters and unsubmitted segments triggering upcoming notice --- src/content.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/content.ts b/src/content.ts index a4d5222f..6b7982f1 100644 --- a/src/content.ts +++ b/src/content.ts @@ -804,7 +804,9 @@ async function startSponsorSchedule(includeIntersectingSegments = false, current currentSkipSchedule = setTimeout(skippingFunction, offsetDelayTime); // Show the notice only if the segment hasn't already started - if (Config.config.showUpcomingNotice && getCurrentTime() < skippingSegments[0].segment[0]) { + if (Config.config.showUpcomingNotice && getCurrentTime() < skippingSegments[0].segment[0] + && !sponsorTimesSubmitting?.some((segment) => segment.segment === currentSkip.segment) + && [ActionType.Skip, ActionType.Mute].includes(skippingSegments[0].actionType)) { const maxPopupTime = 3000; const timeUntilPopup = Math.max(0, offsetDelayTime - maxPopupTime); const popupTime = Math.min(maxPopupTime, timeUntilPopup);