mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-08 20:47:11 +03:00
Fix unsubmitted segments not saving
This commit is contained in:
@@ -566,7 +566,7 @@ class SkipNoticeComponent extends React.Component<SkipNoticeProps, SkipNoticeSta
|
||||
const segmentTimes = Config.local.unsubmittedSegments[sponsorVideoID] || [];
|
||||
segmentTimes.push(sponsorTimesSubmitting);
|
||||
Config.local.unsubmittedSegments[sponsorVideoID] = segmentTimes;
|
||||
Config.forceSyncUpdate("unsubmittedSegments");
|
||||
Config.forceLocalUpdate("unsubmittedSegments");
|
||||
|
||||
this.props.contentContainer().sponsorTimesSubmitting.push(sponsorTimesSubmitting);
|
||||
this.props.contentContainer().updatePreviewBar();
|
||||
|
||||
@@ -640,7 +640,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
||||
sponsorTimesSubmitting[this.props.index].description = description;
|
||||
|
||||
Config.local.unsubmittedSegments[this.props.contentContainer().sponsorVideoID] = sponsorTimesSubmitting;
|
||||
Config.forceSyncUpdate("unsubmittedSegments");
|
||||
Config.forceLocalUpdate("unsubmittedSegments");
|
||||
|
||||
this.props.contentContainer().updatePreviewBar();
|
||||
|
||||
@@ -694,7 +694,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
||||
} else {
|
||||
delete Config.local.unsubmittedSegments[this.props.contentContainer().sponsorVideoID];
|
||||
}
|
||||
Config.forceSyncUpdate("unsubmittedSegments");
|
||||
Config.forceLocalUpdate("unsubmittedSegments");
|
||||
|
||||
this.props.contentContainer().updatePreviewBar();
|
||||
|
||||
|
||||
@@ -238,7 +238,7 @@ class SubmissionNoticeComponent extends React.Component<SubmissionNoticeProps, S
|
||||
sponsorTimesSubmitting = sponsorTimesSubmitting.sort((a, b) => a.segment[0] - b.segment[0]);
|
||||
|
||||
Config.local.unsubmittedSegments[this.props.contentContainer().sponsorVideoID] = sponsorTimesSubmitting;
|
||||
Config.forceSyncUpdate("unsubmittedSegments");
|
||||
Config.forceLocalUpdate("unsubmittedSegments");
|
||||
|
||||
this.forceUpdate();
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ class CategorySkipOptionsComponent extends React.Component<CategorySkipOptionsPr
|
||||
});
|
||||
}
|
||||
|
||||
Config.forceSyncUpdate("categorySelections");
|
||||
Config.forceLocalUpdate("categorySelections");
|
||||
}
|
||||
|
||||
getCategorySkipOptions(): JSX.Element[] {
|
||||
|
||||
@@ -70,7 +70,7 @@ class UnsubmittedVideoListItem extends React.Component<UnsubmittedVideosListItem
|
||||
clearSegments(): void {
|
||||
if (confirm(chrome.i18n.getMessage("clearThis"))) {
|
||||
delete Config.local.unsubmittedSegments[this.props.videoID];
|
||||
Config.forceSyncUpdate("unsubmittedSegments");
|
||||
Config.forceLocalUpdate("unsubmittedSegments");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user