mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-24 00:19:21 +00:00
refactor: remove onAir
This commit is contained in:
committed by
Carlos Valente
parent
0299463f62
commit
94b1f63c7c
@@ -1,4 +1,4 @@
|
|||||||
import { LogOrigin, Playback, runtimeStorePlaceholder, SimpleDirection, SimplePlayback } from 'ontime-types';
|
import { LogOrigin, runtimeStorePlaceholder, SimpleDirection, SimplePlayback } from 'ontime-types';
|
||||||
|
|
||||||
import 'dotenv/config';
|
import 'dotenv/config';
|
||||||
import express from 'express';
|
import express from 'express';
|
||||||
@@ -183,7 +183,6 @@ export const startServer = async (): Promise<{ message: string; serverPort: numb
|
|||||||
eventStore.init({
|
eventStore.init({
|
||||||
clock: state.clock,
|
clock: state.clock,
|
||||||
timer: state.timer,
|
timer: state.timer,
|
||||||
onAir: state.timer.playback !== Playback.Stop,
|
|
||||||
message: { ...runtimeStorePlaceholder.message },
|
message: { ...runtimeStorePlaceholder.message },
|
||||||
runtime: state.runtime,
|
runtime: state.runtime,
|
||||||
eventNow: state.eventNow,
|
eventNow: state.eventNow,
|
||||||
|
|||||||
@@ -730,11 +730,7 @@ function broadcastResult(_target: any, _propertyKey: string, descriptor: Propert
|
|||||||
*/
|
*/
|
||||||
const shouldUpdateClock = shouldRuntimeUpdate || shouldBlockUpdate || normalClockUpdate;
|
const shouldUpdateClock = shouldRuntimeUpdate || shouldBlockUpdate || normalClockUpdate;
|
||||||
|
|
||||||
//Now we set all the updates on the eventstore and update the previous value
|
// Now we set all the updates on the eventstore and update the previous value
|
||||||
if (hasChangedPlayback) {
|
|
||||||
batch.add('onAir', state.timer.playback !== Playback.Stop);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (shouldUpdateTimer) {
|
if (shouldUpdateTimer) {
|
||||||
batch.add('timer', state.timer);
|
batch.add('timer', state.timer);
|
||||||
RuntimeService.previousTimerUpdate = state.clock;
|
RuntimeService.previousTimerUpdate = state.clock;
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ export const runtimeStorePlaceholder: Readonly<RuntimeStore> = {
|
|||||||
secondaryTimer: null, // change on every update
|
secondaryTimer: null, // change on every update
|
||||||
startedAt: null, // change can only be initiated by user
|
startedAt: null, // change can only be initiated by user
|
||||||
},
|
},
|
||||||
onAir: false,
|
|
||||||
message: {
|
message: {
|
||||||
timer: {
|
timer: {
|
||||||
text: '',
|
text: '',
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ export type RuntimeStore = {
|
|||||||
// timer data
|
// timer data
|
||||||
clock: number;
|
clock: number;
|
||||||
timer: TimerState;
|
timer: TimerState;
|
||||||
onAir: boolean;
|
|
||||||
|
|
||||||
// messages service
|
// messages service
|
||||||
message: MessageState;
|
message: MessageState;
|
||||||
|
|||||||
Reference in New Issue
Block a user