add shortcut to jump between blocks (#1181)

* add shortcut

* chore: rename getRelevantBlock to getPreviousBlock
This commit is contained in:
Alex Christoffer Rasmussen
2024-08-19 17:20:58 +02:00
committed by GitHub
parent f708dc0bc4
commit 340f5478fb
7 changed files with 130 additions and 25 deletions
+2 -2
View File
@@ -11,7 +11,7 @@ import {
TimerPhase,
TimerState,
} from 'ontime-types';
import { calculateDuration, checkIsNow, dayInMs, filterTimedEvents, getRelevantBlock } from 'ontime-utils';
import { calculateDuration, checkIsNow, dayInMs, filterTimedEvents, getPreviousBlock } from 'ontime-utils';
import { clock } from '../services/Clock.js';
import { RestorePoint } from '../services/RestoreService.js';
@@ -664,7 +664,7 @@ function loadBlock(rundown: OntimeRundown) {
return;
}
const newCurrentBlock = getRelevantBlock(rundown, runtimeState.eventNow.id);
const newCurrentBlock = getPreviousBlock(rundown, runtimeState.eventNow.id);
// update time only if the block has changed
if (newCurrentBlock === null || newCurrentBlock.id !== runtimeState.currentBlock.block?.id) {