diff --git a/manifest/manifest.json b/manifest/manifest.json index 4eafb170..f0c3d6e3 100644 --- a/manifest/manifest.json +++ b/manifest/manifest.json @@ -1,7 +1,7 @@ { "name": "__MSG_fullName__", "short_name": "SponsorBlock", - "version": "4.1.3", + "version": "4.1.4", "default_locale": "en", "description": "__MSG_Description__", "homepage_url": "https://sponsor.ajay.app", diff --git a/src/components/SponsorTimeEditComponent.tsx b/src/components/SponsorTimeEditComponent.tsx index f9cc0e34..ed379105 100644 --- a/src/components/SponsorTimeEditComponent.tsx +++ b/src/components/SponsorTimeEditComponent.tsx @@ -416,21 +416,21 @@ class SponsorTimeEditComponent extends React.Component): void { const sponsorTime = this.props.contentContainer().sponsorTimesSubmitting[this.props.index]; - this.handleReplacingLostTimes(sponsorTime.category, event.target.value as ActionType); + this.handleReplacingLostTimes(sponsorTime.category, event.target.value as ActionType, sponsorTime); this.saveEditTimes(); } - private handleReplacingLostTimes(category: Category, actionType: ActionType): void { + private handleReplacingLostTimes(category: Category, actionType: ActionType, segment: SponsorTime): void { if (CompileConfig.categorySupport[category]?.includes(ActionType.Poi)) { if (this.previousSkipType !== ActionType.Poi) { - this.timesBeforeChanging = [null, utils.getFormattedTimeToSeconds(this.state.sponsorTimeEdits[1])]; + this.timesBeforeChanging = [null, segment.segment[1]]; } this.setTimeTo(1, null); @@ -445,12 +445,13 @@ class SponsorTimeEditComponent extends React.Component 0 && duration < Config.config.minDuration) { segment.hidden = SponsorHideType.MinimumDuration; } @@ -1947,6 +1947,11 @@ async function sendSubmitMessage() { sponsorTimesSubmitting = []; updatePreviewBar(); + + const fullVideoSegment = sponsorTimes.filter((time) => time.actionType === ActionType.Full)[0]; + if (fullVideoSegment) { + categoryPill?.setSegment(fullVideoSegment); + } } else { // Show that the upload failed playerButtons.submit.button.style.animation = "unset";