mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-22 23:49:15 +00:00
refactor: setup global timer state (#629)
* refactor: setup global timer state --------- Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com> Co-authored-by: Carlos Valente <carlosvalente@pm.me>
This commit is contained in:
@@ -28,6 +28,7 @@ import {
|
||||
import { logger } from '../../classes/Logger.js';
|
||||
import { validateEvent } from '../../utils/parser.js';
|
||||
import { clock } from '../Clock.js';
|
||||
import { state } from '../../state.js';
|
||||
|
||||
/**
|
||||
* Forces rundown to be recalculated
|
||||
@@ -123,7 +124,7 @@ export function updateTimer(affectedIds?: string[]) {
|
||||
if (eventInMemory) {
|
||||
eventLoader.reset();
|
||||
|
||||
if (eventTimer.playback === Playback.Roll) {
|
||||
if (state.playback === Playback.Roll) {
|
||||
const rollTimers = eventLoader.findRoll(clock.timeNow());
|
||||
if (rollTimers === null) {
|
||||
eventTimer.stop();
|
||||
|
||||
Reference in New Issue
Block a user