From ea7f0c0f7d817004bd5f5bea44df03a4917e8a1b Mon Sep 17 00:00:00 2001 From: Matthew Haughton <3flex@users.noreply.github.com> Date: Sun, 3 Nov 2024 23:19:04 +1100 Subject: [PATCH] Remove unused function setBackdropPeriodMs --- src/components/documentManager.ts | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/src/components/documentManager.ts b/src/components/documentManager.ts index f3df9d60..598b56e5 100644 --- a/src/components/documentManager.ts +++ b/src/components/documentManager.ts @@ -7,7 +7,7 @@ import { DeviceIds, getActiveDeviceId } from './castDevices'; // eslint-disable-next-line @typescript-eslint/no-extraneous-class export abstract class DocumentManager { // Duration between each backdrop switch in ms - private static backdropPeriodMs: number | null = 30000; + private static backdropPeriodMs = 30000; // Timer state - so that we don't start the interval more than necessary private static backdropTimer: number | null = null; @@ -404,13 +404,6 @@ export abstract class DocumentManager { // avoid running it multiple times this.clearBackdropInterval(); - // skip out if it's disabled - if (!this.backdropPeriodMs) { - this.setWaitingBackdrop(null, null); - - return; - } - this.backdropTimer = window.setInterval( () => DocumentManager.setRandomUserBackdrop(), this.backdropPeriodMs @@ -419,28 +412,6 @@ export abstract class DocumentManager { await this.setRandomUserBackdrop(); } - /** - * Set interval between backdrop changes, null to disable - * @param period - in milliseconds or null - */ - public static setBackdropPeriodMs(period: number | null): void { - if (period !== this.backdropPeriodMs) { - this.backdropPeriodMs = period; - - // If the timer was running, restart it - if (this.backdropTimer !== null) { - // startBackdropInterval will also clear the previous one - this.startBackdropInterval(); - } - - if (period === null) { - // No backdrop is wanted, and the timer has been cleared. - // This call will remove any present backdrop. - this.setWaitingBackdrop(null, null); - } - } - } - /** * Set background behind the media player, * this is shown while the media is loading.