send imediat update on mode change

This commit is contained in:
arc-alex
2025-03-10 22:57:04 +01:00
parent 140a3310cb
commit 8cda9eac0a
2 changed files with 5 additions and 2 deletions
@@ -707,11 +707,14 @@ function broadcastResult(_target: any, _propertyKey: string, descriptor: Propert
// for the very fist run there will be nothing in the previousState so we force an update
const justStarted = !RuntimeService.previousState?.timer;
// offset mode has been changed
const offsetModeChanged = RuntimeService.previousState?.runtime?.offsetMode !== state.runtime.offsetMode;
// if playback changes most things should update
const hasChangedPlayback = RuntimeService.previousState.timer?.playback !== state.timer.playback;
// combine all big changes
const hasImmediateChanges = hasNewLoaded || justStarted || hasChangedPlayback;
const hasImmediateChanges = hasNewLoaded || justStarted || hasChangedPlayback || offsetModeChanged;
/**
* Timer should be updated if
+1 -1
View File
@@ -84,7 +84,7 @@ export function getState(): Readonly<RuntimeState> {
};
}
//TODO: find other thinbgs that dose not need clearing
//TODO: find other things that dose not need clearing
export function softClear() {
runtimeState.eventNow = null;
runtimeState.publicEventNow = null;