diff --git a/src/renderer-settings.ts b/src/renderer-settings.ts index ac11970..eeb7b70 100644 --- a/src/renderer-settings.ts +++ b/src/renderer-settings.ts @@ -193,16 +193,12 @@ function changeLanguage(lang: string): void { const activeTabId = document.querySelector('.tab-content.active')?.id || 'vodsTab'; const activeTab = activeTabId.replace('Tab', ''); - if (activeTab === 'vods' && currentStreamer) { - const setTitle = (window as unknown as { setPageTitle?: (text: string) => void }).setPageTitle; - if (typeof setTitle === 'function') setTitle(currentStreamer); - else byId('pageTitle').textContent = currentStreamer; - } else { - const setTitle = (window as unknown as { setPageTitle?: (text: string) => void }).setPageTitle; - const text = (UI_TEXT.tabs as Record)[activeTab] || UI_TEXT.appName; - if (typeof setTitle === 'function') setTitle(text); - else byId('pageTitle').textContent = text; - } + const titleText = (activeTab === 'vods' && currentStreamer) + ? currentStreamer + : ((UI_TEXT.tabs as Record)[activeTab] || UI_TEXT.appName); + const setTitle = (window as unknown as { setPageTitle?: (text: string) => void }).setPageTitle; + if (typeof setTitle === 'function') setTitle(titleText); + else byId('pageTitle').textContent = titleText; void refreshRuntimeMetrics(); void refreshAutomationStatusLine();