mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-22 15:39:11 +00:00
fix: expectedFinish flashing incorrect value when adding timer in overtime
This commit is contained in:
@@ -488,13 +488,13 @@ export function addTime(amount: number) {
|
|||||||
|
|
||||||
// we can update the state after handling the side effects
|
// we can update the state after handling the side effects
|
||||||
runtimeState.timer.addedTime += amount;
|
runtimeState.timer.addedTime += amount;
|
||||||
runtimeState.timer.expectedFinish += amount;
|
|
||||||
runtimeState.timer.current += amount;
|
runtimeState.timer.current += amount;
|
||||||
|
|
||||||
// update runtime delays: over - under
|
// update runtime delays: over - under
|
||||||
const { absolute, relative } = getRuntimeOffset(runtimeState);
|
const { absolute, relative } = getRuntimeOffset(runtimeState);
|
||||||
runtimeState.offset.absolute = absolute;
|
runtimeState.offset.absolute = absolute;
|
||||||
runtimeState.offset.relative = relative;
|
runtimeState.offset.relative = relative;
|
||||||
|
runtimeState.timer.expectedFinish = getExpectedFinish(runtimeState);
|
||||||
getExpectedTimes();
|
getExpectedTimes();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user