Compare commits

..

2 Commits

Author SHA1 Message Date
xRangerDE
8dc374d50e release: 4.6.78 dedupe setPageTitle in renderer-settings
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 05:33:47 +02:00
xRangerDE
e705beabf3 cleanup: dedupe setPageTitle fallback in renderer-settings
4.6.77 inlined the setPageTitle global-window resolution + fallback
twice — once in each branch of the "vods+streamer vs other tab"
conditional. Reading two near-identical 4-line if/else stanzas back
to back was harder than necessary.

Collapsed the branch to a single ternary that picks the title text
first, then a single setPageTitle resolve + apply block at the end.
Same behavior, one resolution of the optional global.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 05:33:47 +02:00
3 changed files with 9 additions and 13 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "twitch-vod-manager", "name": "twitch-vod-manager",
"version": "4.6.77", "version": "4.6.78",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "twitch-vod-manager", "name": "twitch-vod-manager",
"version": "4.6.77", "version": "4.6.78",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"axios": "^1.6.0", "axios": "^1.6.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "twitch-vod-manager", "name": "twitch-vod-manager",
"version": "4.6.77", "version": "4.6.78",
"description": "Twitch VOD Manager - Download Twitch VODs easily", "description": "Twitch VOD Manager - Download Twitch VODs easily",
"main": "dist/main.js", "main": "dist/main.js",
"author": "xRangerDE", "author": "xRangerDE",

View File

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