File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -541,9 +541,14 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
541541 const sponsorTime = this . props . contentContainer ( ) . sponsorTimesSubmitting [ this . props . index ] ;
542542 if ( time === null ) time = sponsorTime . segment [ 0 ] ;
543543
544+ const addedTime = sponsorTime . segment . length === 1 ;
544545 sponsorTime . segment [ index ] = time ;
545546 if ( sponsorTime . actionType === ActionType . Poi ) sponsorTime . segment [ 1 ] = time ;
546547
548+ if ( addedTime ) {
549+ this . props . contentContainer ( ) . updateEditButtonsOnPlayer ( ) ;
550+ }
551+
547552 this . setState ( {
548553 sponsorTimeEdits : this . getFormattedSponsorTimesEdits ( sponsorTime )
549554 } , ( ) => this . saveEditTimes ( ) ) ;
@@ -583,7 +588,12 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
583588
584589 // Change segment time only if the format was correct
585590 if ( startTime !== null && endTime !== null ) {
591+ const addingTime = sponsorTimesSubmitting [ this . props . index ] . segment . length === 1 ;
586592 sponsorTimesSubmitting [ this . props . index ] . segment = [ startTime , endTime ] ;
593+
594+ if ( addingTime ) {
595+ this . props . contentContainer ( ) . updateEditButtonsOnPlayer ( ) ;
596+ }
587597 }
588598 } else if ( this . state . sponsorTimeEdits [ 1 ] === null && category === "outro" ) {
589599 sponsorTimesSubmitting [ this . props . index ] . segment [ 1 ] = this . props . contentContainer ( ) . v . duration ;
You can’t perform that action at this time.
0 commit comments