mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-14 20:03:52 +00:00
refactor: remove finishedAt from runtime data (#1716)
This commit is contained in:
committed by
Carlos Valente
parent
94b1f63c7c
commit
486d89ecf4
@@ -13,7 +13,7 @@ export const normaliseEndTime = (start: number, end: number) => (end < start ? e
|
||||
* @returns {number | null} new current time or null if nothing is running
|
||||
*/
|
||||
export function getExpectedFinish(state: RuntimeState): MaybeNumber {
|
||||
const { startedAt, finishedAt, duration, addedTime } = state.timer;
|
||||
const { startedAt, duration, addedTime } = state.timer;
|
||||
|
||||
if (state.eventNow === null) {
|
||||
return null;
|
||||
@@ -27,10 +27,6 @@ export function getExpectedFinish(state: RuntimeState): MaybeNumber {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (finishedAt !== null) {
|
||||
return finishedAt;
|
||||
}
|
||||
|
||||
const pausedTime = pausedAt != null ? clock - pausedAt : 0;
|
||||
|
||||
if (countToEnd) {
|
||||
|
||||
Reference in New Issue
Block a user