From 84a234f9b63ea9cfa95aec85db7980e337ce5fec Mon Sep 17 00:00:00 2001 From: Ajay Date: Tue, 22 Feb 2022 01:21:18 -0500 Subject: [PATCH] Fix full video saving old times Fix #1198 --- src/components/SponsorTimeEditComponent.tsx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/components/SponsorTimeEditComponent.tsx b/src/components/SponsorTimeEditComponent.tsx index 4278ecb6..79922239 100644 --- a/src/components/SponsorTimeEditComponent.tsx +++ b/src/components/SponsorTimeEditComponent.tsx @@ -381,21 +381,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); @@ -410,12 +410,13 @@ class SponsorTimeEditComponent extends React.Component