mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-17 21:24:11 +00:00
block end calculation (#1683)
This commit is contained in:
committed by
Carlos Valente
parent
e811a82be2
commit
e9dda817e5
@@ -771,11 +771,12 @@ function broadcastResult(_target: any, _propertyKey: string, descriptor: Propert
|
||||
!deepEqual(RuntimeService.previousState?.runtime, state.runtime);
|
||||
|
||||
/**
|
||||
* the currentBlock object has no ticking values so we only need to check for equality
|
||||
* the currentBlock object has the potential to tick on expected end
|
||||
* TODO: the value shows up one tick to late
|
||||
*/
|
||||
const shouldBlockUpdate =
|
||||
!deepEqual(RuntimeService?.previousState.blockNow, state.blockNow) ||
|
||||
!deepEqual(RuntimeService?.previousState.blockNext, state.blockNext);
|
||||
RuntimeService?.previousState.blockNext !== state.blockNext;
|
||||
|
||||
/**
|
||||
* Many other values are calculated based on the clock
|
||||
@@ -806,7 +807,7 @@ function broadcastResult(_target: any, _propertyKey: string, descriptor: Propert
|
||||
batch.add('blockNow', state.blockNow);
|
||||
batch.add('blockNext', state.blockNext);
|
||||
RuntimeService.previousState.blockNow = structuredClone(state.blockNow);
|
||||
RuntimeService.previousState.blockNext = structuredClone(state.blockNext);
|
||||
RuntimeService.previousState.blockNext = state.blockNext;
|
||||
}
|
||||
|
||||
if (hasImmediateChanges) {
|
||||
|
||||
Reference in New Issue
Block a user