Don't force-sync unsubmitted segments when clear confirm prompt is cancelled

This commit is contained in:
mini-bomba
2022-08-20 16:47:18 +02:00
committed by Ajay
parent bd292ff886
commit 26f2143247

View File

@@ -1,6 +1,6 @@
import * as React from "react"; import * as React from "react";
import Config from "../config" import Config from "../config";
export interface UnsubmittedVideosListItemProps { export interface UnsubmittedVideosListItemProps {
videoID: string; videoID: string;
@@ -54,10 +54,10 @@ class UnsubmittedVideoListItem extends React.Component<UnsubmittedVideosListItem
} }
clearSegments(): void { clearSegments(): void {
if (confirm(chrome.i18n.getMessage("clearThis"))) if (confirm(chrome.i18n.getMessage("clearThis"))) {
delete Config.config.unsubmittedSegments[this.props.videoID] delete Config.config.unsubmittedSegments[this.props.videoID]
Config.forceSyncUpdate("unsubmittedSegments")
Config.forceSyncUpdate("unsubmittedSegments") }
} }
} }