minor partial state fixes

This commit is contained in:
Maxim Devaev
2024-11-04 18:06:16 +02:00
parent d93639ba8d
commit 7ef2e16b51
7 changed files with 85 additions and 75 deletions

View File

@@ -138,17 +138,17 @@ export function Streamer() {
if (!__state) {
__state = {};
}
if (state.features) {
if (state.features !== undefined) {
__state.features = state.features;
__state.limits = state.limits; // Following together with features
}
if (__state.features && state.streamer !== undefined) {
__setControlsEnabled(!!state.streamer);
if (__state.features !== undefined && state.streamer !== undefined) {
__state.streamer = state.streamer;
__setControlsEnabled(!!state.streamer);
}
} else {
__setControlsEnabled(false);
__state = null;
__setControlsEnabled(false);
}
let visible = wm.isWindowVisible($("stream-window"));
__applyState((visible && __state && __state.features) ? state : null);