mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-13 11:23:50 +00:00
Fix: rearrange playing event (#1640)
* creat failing test * find and pass index of eventNow in case it moved * fix cache invalidate edits should also recalculate timer * use coluor as test indicator * fixed empty cue guard Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com> --------- Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
fb93063b47
commit
4e561cf01f
@@ -379,8 +379,9 @@ export function updateLoaded(event?: PlayableEvent): string | undefined {
|
||||
export function updateAll(rundown: Rundown, timedEventsOrder: EntryId[]) {
|
||||
const timedEvents = filterTimedEvents(rundown, timedEventsOrder);
|
||||
// TODO(remove public): we dont need to make the timedEvents object, we pass primitives and let the functions handle it
|
||||
loadNow(timedEvents);
|
||||
loadNext(timedEvents);
|
||||
const eventNowIndex = timedEventsOrder.findIndex((id) => id === runtimeState.eventNow?.id);
|
||||
loadNow(timedEvents, eventNowIndex >= 0 ? eventNowIndex : undefined);
|
||||
loadNext(timedEvents, eventNowIndex >= 0 ? eventNowIndex : undefined);
|
||||
updateLoaded(runtimeState.eventNow ?? undefined);
|
||||
loadBlock(rundown);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user