aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/js-components/skipButtonControlBar.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/js-components/skipButtonControlBar.ts')
-rw-r--r--src/js-components/skipButtonControlBar.ts9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/js-components/skipButtonControlBar.ts b/src/js-components/skipButtonControlBar.ts
index b14eed18..b5c18386 100644
--- a/src/js-components/skipButtonControlBar.ts
+++ b/src/js-components/skipButtonControlBar.ts
@@ -1,8 +1,9 @@
import Config from "../config";
import { SegmentUUID, SponsorTime } from "../types";
import { getSkippingText } from "../utils/categoryUtils";
-import { AnimationUtils } from "../utils/animationUtils";
+import { AnimationUtils } from "../../maze-utils/src/animationUtils";
import { keybindToString } from "../../maze-utils/src/config";
+import { isMobileControlsOpen } from "../utils/mobileUtils";
export interface SkipButtonControlBarProps {
skip: (segment: SponsorTime) => void;
@@ -183,10 +184,8 @@ export class SkipButtonControlBar {
}
updateMobileControls(): void {
- const overlay = document.getElementById("player-control-overlay");
-
- if (overlay && this.enabled) {
- if (overlay?.classList?.contains("fadein")) {
+ if (this.enabled) {
+ if (isMobileControlsOpen()) {
this.showButton();
} else {
this.hideButton();