aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/components/SubmissionNoticeComponent.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/SubmissionNoticeComponent.tsx')
-rw-r--r--src/components/SubmissionNoticeComponent.tsx10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/components/SubmissionNoticeComponent.tsx b/src/components/SubmissionNoticeComponent.tsx
index 7ddc3e0e..2cf394f1 100644
--- a/src/components/SubmissionNoticeComponent.tsx
+++ b/src/components/SubmissionNoticeComponent.tsx
@@ -14,7 +14,7 @@ export interface SubmissionNoticeProps {
// Contains functions and variables from the content script needed by the skip notice
contentContainer: ContentContainer;
- callback: () => unknown;
+ callback: () => Promise<boolean>;
closeListener: () => void;
}
@@ -239,9 +239,11 @@ class SubmissionNoticeComponent extends React.Component<SubmissionNoticeProps, S
}
}
- this.props.callback();
-
- this.cancel();
+ this.props.callback().then((success) => {
+ if (success) {
+ this.cancel();
+ }
+ });
}
sortSegments(): void {