aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/render/SkipNotice.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/SkipNotice.tsx')
-rw-r--r--src/render/SkipNotice.tsx16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/render/SkipNotice.tsx b/src/render/SkipNotice.tsx
index 58600034..bcba9d14 100644
--- a/src/render/SkipNotice.tsx
+++ b/src/render/SkipNotice.tsx
@@ -5,7 +5,8 @@ import Utils from "../utils";
const utils = new Utils();
import SkipNoticeComponent, { SkipNoticeAction } from "../components/SkipNoticeComponent";
-import { SponsorTime, ContentContainer } from "../types";
+import { SponsorTime, ContentContainer, NoticeVisbilityMode } from "../types";
+import Config from "../config";
class SkipNotice {
segments: SponsorTime[];
@@ -17,7 +18,7 @@ class SkipNotice {
skipNoticeRef: React.MutableRefObject<SkipNoticeComponent>;
- constructor(segments: SponsorTime[], autoSkip = false, contentContainer: ContentContainer) {
+ constructor(segments: SponsorTime[], autoSkip = false, contentContainer: ContentContainer, unskipTime: number = null) {
this.skipNoticeRef = React.createRef();
this.segments = segments;
@@ -44,11 +45,20 @@ class SkipNotice {
autoSkip={autoSkip}
contentContainer={contentContainer}
ref={this.skipNoticeRef}
- closeListener={() => this.close()} />,
+ closeListener={() => this.close()}
+ smaller={Config.config.noticeVisibilityMode >= NoticeVisbilityMode.MiniForAll
+ || (Config.config.noticeVisibilityMode >= NoticeVisbilityMode.MiniForAutoSkip && autoSkip)}
+ unskipTime={unskipTime} />,
this.noticeElement
);
}
+ setShowKeybindHint(value: boolean): void {
+ this.skipNoticeRef.current.setState({
+ showKeybindHint: value
+ });
+ }
+
close(): void {
ReactDOM.unmountComponentAtNode(this.noticeElement);