the_news: check if we're connected prior to asking for nextTransition
This commit is contained in:
parent
b11de69b0a
commit
ebfde59120
1 changed files with 9 additions and 7 deletions
|
@ -51,6 +51,7 @@ const considerDoingTheNews = (getState: () => RootState) => async () => {
|
|||
if (state.settings.doTheNews === "always") {
|
||||
await actuallyDoTheNews();
|
||||
} else if (state.settings.doTheNews === "while_live") {
|
||||
if (state.broadcast.connectionState === "CONNECTED" || state.broadcast.connectionState === "LIVE") {
|
||||
const transition = await broadcastApiRequest<{
|
||||
autoNews: boolean;
|
||||
selSource: number;
|
||||
|
@ -60,6 +61,7 @@ const considerDoingTheNews = (getState: () => RootState) => async () => {
|
|||
await actuallyDoTheNews();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
let newsTimer: Timer | null = null;
|
||||
|
|
Loading…
Reference in a new issue