mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-21 23:19:09 +00:00
self documenting
This commit is contained in:
@@ -168,7 +168,6 @@ type CurrentTimers = {
|
|||||||
export const updateRoll = (currentTimers: CurrentTimers) => {
|
export const updateRoll = (currentTimers: CurrentTimers) => {
|
||||||
const { selectedEventId, current, _finishAt, _startAt, clock, secondaryTimer, secondaryTarget } = currentTimers;
|
const { selectedEventId, current, _finishAt, _startAt, clock, secondaryTimer, secondaryTarget } = currentTimers;
|
||||||
|
|
||||||
console.log(currentTimers);
|
|
||||||
// timers
|
// timers
|
||||||
let updatedTimer = current;
|
let updatedTimer = current;
|
||||||
let updatedSecondaryTimer = secondaryTimer;
|
let updatedSecondaryTimer = secondaryTimer;
|
||||||
@@ -186,7 +185,10 @@ export const updateRoll = (currentTimers: CurrentTimers) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (updatedTimer < 0) {
|
if (updatedTimer < 0) {
|
||||||
if (Math.abs(updatedTimer) < config.rollSkipLimit) isPrimaryFinished = true; //Dont trigger Finished if we are over the skip limit
|
const hasSkipped = Math.abs(updatedTimer) > config.rollSkipLimit;
|
||||||
|
if (!hasSkipped) {
|
||||||
|
isPrimaryFinished = true;
|
||||||
|
}
|
||||||
// we need a new event
|
// we need a new event
|
||||||
doRollLoad = true;
|
doRollLoad = true;
|
||||||
} else if (clock < _startAt) {
|
} else if (clock < _startAt) {
|
||||||
|
|||||||
Reference in New Issue
Block a user