mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-07 20:17:05 +03:00
Hide time from exclusive access right away
This commit is contained in:
@@ -473,9 +473,13 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sponsorTimesSubmitting[this.props.index].category = this.categoryOptionRef.current.value as Category;
|
const category = this.categoryOptionRef.current.value as Category
|
||||||
sponsorTimesSubmitting[this.props.index].actionType =
|
sponsorTimesSubmitting[this.props.index].category = category;
|
||||||
this.actionTypeOptionRef?.current ? this.actionTypeOptionRef.current.value as ActionType : ActionType.Skip;
|
|
||||||
|
const inputActionType = this.actionTypeOptionRef?.current?.value as ActionType;
|
||||||
|
const actionType = inputActionType && CompileConfig.categorySupport[category]?.includes(inputActionType) ? inputActionType as ActionType
|
||||||
|
: CompileConfig.categorySupport[category]?.[0] ?? ActionType.Skip;
|
||||||
|
sponsorTimesSubmitting[this.props.index].actionType = actionType;
|
||||||
|
|
||||||
Config.config.segmentTimes.set(this.props.contentContainer().sponsorVideoID, sponsorTimesSubmitting);
|
Config.config.segmentTimes.set(this.props.contentContainer().sponsorVideoID, sponsorTimesSubmitting);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user