mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-08 04:27:15 +03:00
Delete unused unsubmitted objects
This commit is contained in:
@@ -556,7 +556,11 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
|||||||
sponsorTimes.splice(index, 1);
|
sponsorTimes.splice(index, 1);
|
||||||
|
|
||||||
//save this
|
//save this
|
||||||
Config.config.unsubmittedSegments[this.props.contentContainer().sponsorVideoID] = sponsorTimes;
|
if (sponsorTimes.length > 0) {
|
||||||
|
Config.config.unsubmittedSegments[this.props.contentContainer().sponsorVideoID] = sponsorTimes;
|
||||||
|
} else {
|
||||||
|
delete Config.config.unsubmittedSegments[this.props.contentContainer().sponsorVideoID];
|
||||||
|
}
|
||||||
Config.forceUpdate("unsubmittedSegments");
|
Config.forceUpdate("unsubmittedSegments");
|
||||||
|
|
||||||
this.props.contentContainer().updatePreviewBar();
|
this.props.contentContainer().updatePreviewBar();
|
||||||
|
|||||||
Reference in New Issue
Block a user