aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAjay <[email protected]>2024-01-05 22:21:51 -0500
committerAjay <[email protected]>2024-01-05 22:21:51 -0500
commit778d82382052db6a26e46f6b428e7ac49afaf3a8 (patch)
tree807754aa122075141afcdbd4ea9df0410c0b5926
parenta3c43c868abb56af6f1f516f305f74d1efd44029 (diff)
downloadSponsorBlock-778d82382052db6a26e46f6b428e7ac49afaf3a8.tar.gz
SponsorBlock-778d82382052db6a26e46f6b428e7ac49afaf3a8.zip
Fix unsubmitted segments not saving
m---------maze-utils0
-rw-r--r--src/components/SkipNoticeComponent.tsx2
-rw-r--r--src/components/SponsorTimeEditComponent.tsx4
-rw-r--r--src/components/SubmissionNoticeComponent.tsx2
-rw-r--r--src/components/options/CategorySkipOptionsComponent.tsx2
-rw-r--r--src/components/options/UnsubmittedVideoListItem.tsx2
-rw-r--r--src/content.ts14
7 files changed, 13 insertions, 13 deletions
diff --git a/maze-utils b/maze-utils
-Subproject 69d771d0f3b96951c970a9eacb046b808907bb1
+Subproject e2b43d4101009f2157ee2e0cd54e1536953e54c
diff --git a/src/components/SkipNoticeComponent.tsx b/src/components/SkipNoticeComponent.tsx
index b8cf7acd..0a351c6c 100644
--- a/src/components/SkipNoticeComponent.tsx
+++ b/src/components/SkipNoticeComponent.tsx
@@ -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();
diff --git a/src/components/SponsorTimeEditComponent.tsx b/src/components/SponsorTimeEditComponent.tsx
index 001755dd..c1af4696 100644
--- a/src/components/SponsorTimeEditComponent.tsx
+++ b/src/components/SponsorTimeEditComponent.tsx
@@ -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();
diff --git a/src/components/SubmissionNoticeComponent.tsx b/src/components/SubmissionNoticeComponent.tsx
index 8f29bcb4..9aa52670 100644
--- a/src/components/SubmissionNoticeComponent.tsx
+++ b/src/components/SubmissionNoticeComponent.tsx
@@ -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();
}
diff --git a/src/components/options/CategorySkipOptionsComponent.tsx b/src/components/options/CategorySkipOptionsComponent.tsx
index d9d89cf0..b82b0a52 100644
--- a/src/components/options/CategorySkipOptionsComponent.tsx
+++ b/src/components/options/CategorySkipOptionsComponent.tsx
@@ -158,7 +158,7 @@ class CategorySkipOptionsComponent extends React.Component<CategorySkipOptionsPr
});
}
- Config.forceSyncUpdate("categorySelections");
+ Config.forceLocalUpdate("categorySelections");
}
getCategorySkipOptions(): JSX.Element[] {
diff --git a/src/components/options/UnsubmittedVideoListItem.tsx b/src/components/options/UnsubmittedVideoListItem.tsx
index 8ff92911..bc8ca28c 100644
--- a/src/components/options/UnsubmittedVideoListItem.tsx
+++ b/src/components/options/UnsubmittedVideoListItem.tsx
@@ -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");
}
}
diff --git a/src/content.ts b/src/content.ts
index 76201831..0ea9da11 100644
--- a/src/content.ts
+++ b/src/content.ts
@@ -308,7 +308,7 @@ function messageListener(request: Message, sender: unknown, sendResponse: (respo
if (addedSegments) {
Config.local.unsubmittedSegments[getVideoID()] = sponsorTimesSubmitting;
- Config.forceSyncUpdate("unsubmittedSegments");
+ Config.forceLocalUpdate("unsubmittedSegments");
updateEditButtonsOnPlayer();
updateSponsorTimesSubmitting(false);
@@ -1926,7 +1926,7 @@ function startOrEndTimingNewSegment() {
// Save the newly created segment
Config.local.unsubmittedSegments[getVideoID()] = sponsorTimesSubmitting;
- Config.forceSyncUpdate("unsubmittedSegments");
+ Config.forceLocalUpdate("unsubmittedSegments");
// Make sure they know if someone has already submitted something it while they were watching
sponsorsLookup();
@@ -1964,7 +1964,7 @@ function cancelCreatingSegment() {
sponsorTimesSubmitting = [];
delete Config.local.unsubmittedSegments[getVideoID()];
}
- Config.forceSyncUpdate("unsubmittedSegments");
+ Config.forceLocalUpdate("unsubmittedSegments");
}
updateEditButtonsOnPlayer();
@@ -2113,7 +2113,7 @@ function clearSponsorTimes() {
//clear the sponsor times
delete Config.local.unsubmittedSegments[currentVideoID];
- Config.forceSyncUpdate("unsubmittedSegments");
+ Config.forceLocalUpdate("unsubmittedSegments");
//clear sponsor times submitting
sponsorTimesSubmitting = [];
@@ -2277,7 +2277,7 @@ async function sendSubmitMessage() {
//update sponsorTimes
Config.local.unsubmittedSegments[getVideoID()] = sponsorTimesSubmitting;
- Config.forceSyncUpdate("unsubmittedSegments");
+ Config.forceLocalUpdate("unsubmittedSegments");
// Check to see if any of the submissions are below the minimum duration set
if (Config.config.minDuration > 0) {
@@ -2305,7 +2305,7 @@ async function sendSubmitMessage() {
// Remove segments from storage since they've already been submitted
delete Config.local.unsubmittedSegments[getVideoID()];
- Config.forceSyncUpdate("unsubmittedSegments");
+ Config.forceLocalUpdate("unsubmittedSegments");
const newSegments = sponsorTimesSubmitting;
try {
@@ -2611,7 +2611,7 @@ function checkForPreloadedSegment() {
if (pushed) {
Config.local.unsubmittedSegments[getVideoID()] = sponsorTimesSubmitting;
- Config.forceSyncUpdate("unsubmittedSegments");
+ Config.forceLocalUpdate("unsubmittedSegments");
}
}