mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-09 13:07:05 +03:00
Add warning for submitting multiple highlights
This commit is contained in:
@@ -279,6 +279,11 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
||||
if (getCategoryActionType(event.target.value as Category) === CategoryActionType.POI) {
|
||||
this.setTimeTo(1, null);
|
||||
this.props.contentContainer().updateEditButtonsOnPlayer();
|
||||
|
||||
if (this.props.contentContainer().sponsorTimesSubmitting
|
||||
.some((segment, i) => segment.category === event.target.value && i !== this.props.index)) {
|
||||
alert(chrome.i18n.getMessage("poiOnlyOneSegment"));
|
||||
}
|
||||
}
|
||||
|
||||
this.saveEditTimes();
|
||||
|
||||
Reference in New Issue
Block a user