How about this?

This commit is contained in:
Matthew Stratford 2020-11-02 20:19:14 +00:00
parent 126d43aaa5
commit 779ddf2ff7
No known key found for this signature in database
GPG key ID: 9E53C8B3F0B57395

View file

@ -51,9 +51,10 @@ const considerDoingTheNews = (getState: () => RootState) => async () => {
if (state.settings.doTheNews === "always") {
await actuallyDoTheNews();
} else if (state.settings.doTheNews === "while_live") {
if (
state.broadcast.connectionState in ["CONNECTED", "GOING_LIVE", "LIVE"]
) {
switch (state.broadcast.connectionState) {
case "CONNECTED":
case "GOING_LIVE":
case "LIVE":
const transition = await broadcastApiRequest<{
autoNews: boolean;
selSource: number;
@ -62,6 +63,7 @@ const considerDoingTheNews = (getState: () => RootState) => async () => {
if (transition.autoNews) {
await actuallyDoTheNews();
}
break;
}
}
};