From 59b125fd2aa7f58f663a406d77ed9eba597297be Mon Sep 17 00:00:00 2001 From: ARIA Date: Sun, 12 Jul 2026 17:56:35 +0200 Subject: [PATCH] Fixes #20: Call updateSectionVisibility() during init to show equipment tab The equipment section has display:none in CSS and updateSectionVisibility() is the only function that calls .show() on it. It was never called during initialization, only when settings toggles changed. Added the call to the main init flow so the equipment tab becomes visible on page load. --- index.js | 3 ++- src/systems/ui/desktop.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index c298000..b6eade4 100644 --- a/index.js +++ b/index.js @@ -349,7 +349,8 @@ jQuery(async () => { initThoughtBasedExpressions(); updateFabWidgets(); updateStripWidgets(); - // Explicit initial render of equipment to ensure it's visible + // Ensure section visibility matches settings (equipment is hidden by CSS, needs explicit .show()) + updateSectionVisibility(); renderEquipment(); } catch (error) { console.error('[RPG Companion] Chat data load failed, using defaults:', error); diff --git a/src/systems/ui/desktop.js b/src/systems/ui/desktop.js index 582cf48..2a847b0 100644 --- a/src/systems/ui/desktop.js +++ b/src/systems/ui/desktop.js @@ -7,6 +7,7 @@ import { i18n } from '../../core/i18n.js'; import { extensionSettings, lastGeneratedData, committedTrackerData } from '../../core/state.js'; import { hexToRgba } from './theme.js'; import { repairJSON } from '../../utils/jsonRepair.js'; +import { invalidateCache } from './renderUtils.js'; /** * Helper to parse time string and calculate clock hand angles