How about this?
This commit is contained in:
parent
126d43aaa5
commit
779ddf2ff7
1 changed files with 13 additions and 11 deletions
|
@ -51,9 +51,10 @@ const considerDoingTheNews = (getState: () => RootState) => async () => {
|
||||||
if (state.settings.doTheNews === "always") {
|
if (state.settings.doTheNews === "always") {
|
||||||
await actuallyDoTheNews();
|
await actuallyDoTheNews();
|
||||||
} else if (state.settings.doTheNews === "while_live") {
|
} else if (state.settings.doTheNews === "while_live") {
|
||||||
if (
|
switch (state.broadcast.connectionState) {
|
||||||
state.broadcast.connectionState in ["CONNECTED", "GOING_LIVE", "LIVE"]
|
case "CONNECTED":
|
||||||
) {
|
case "GOING_LIVE":
|
||||||
|
case "LIVE":
|
||||||
const transition = await broadcastApiRequest<{
|
const transition = await broadcastApiRequest<{
|
||||||
autoNews: boolean;
|
autoNews: boolean;
|
||||||
selSource: number;
|
selSource: number;
|
||||||
|
@ -62,6 +63,7 @@ const considerDoingTheNews = (getState: () => RootState) => async () => {
|
||||||
if (transition.autoNews) {
|
if (transition.autoNews) {
|
||||||
await actuallyDoTheNews();
|
await actuallyDoTheNews();
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue