mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-17 21:24:11 +00:00
fix v2 roll timer (#363)
* fix: roll update skips elapsed time * refactor: remove unused data * style: fix style in roll state
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import { ReactNode, useMemo } from 'react';
|
||||
import { Playback, TitleBlock } from 'ontime-types';
|
||||
import { useStore } from 'zustand';
|
||||
|
||||
import useEventData from '../../common/hooks-query/useEventData';
|
||||
import useRundown from '../../common/hooks-query/useRundown';
|
||||
import useViewSettings from '../../common/hooks-query/useViewSettings';
|
||||
import { useRuntimeStore } from '../../common/stores/runtime';
|
||||
import { runtime } from '../../common/stores/runtime';
|
||||
import { useViewOptionsStore } from '../../common/stores/viewOptions';
|
||||
|
||||
export type TitleManager = TitleBlock & { showNow: boolean; showNext: boolean };
|
||||
@@ -27,7 +28,7 @@ const withData = (Component: ReactNode) => {
|
||||
}, [eventsData]);
|
||||
|
||||
// websocket data
|
||||
const data = useRuntimeStore();
|
||||
const data = useStore(runtime);
|
||||
const { timer, titles, titlesPublic, publicMessage, timerMessage, lowerMessage, playback, onAir } = data;
|
||||
const publicSelectedId = data.loaded.selectedPublicEventId;
|
||||
const selectedId = data.loaded.selectedEventId;
|
||||
|
||||
@@ -90,7 +90,7 @@ export default function Countdown(props: CountdownProps) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const standby = time.playback !== Playback.Play && selectedId === follow?.id;
|
||||
const standby = time.playback !== Playback.Play && time.playback !== Playback.Roll && selectedId === follow?.id;
|
||||
const isRunningFinished = time.finished && runningMessage === TimerMessage.running;
|
||||
const isSelected = runningMessage === TimerMessage.running;
|
||||
const delayedTimerStyles = delay > 0 ? 'aux-timers__value--delayed' : '';
|
||||
|
||||
Reference in New Issue
Block a user