From 30d7c9bb812e253c09f563f3f9b5022a3364f636 Mon Sep 17 00:00:00 2001 From: AAGaming Date: Sun, 18 Jun 2023 17:27:23 -0400 Subject: fix: fix blank plugins this is why i shouldn't program at night --- frontend/src/tabs-hook.tsx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'frontend/src/tabs-hook.tsx') diff --git a/frontend/src/tabs-hook.tsx b/frontend/src/tabs-hook.tsx index 08206c14..72437701 100644 --- a/frontend/src/tabs-hook.tsx +++ b/frontend/src/tabs-hook.tsx @@ -128,7 +128,13 @@ class TabsHook extends Logger { let deckyTabAmount = existingTabs.reduce((prev: any, cur: any) => (cur.decky ? prev + 1 : prev), 0); if (deckyTabAmount == this.tabs.length) { for (let tab of existingTabs) { - if (tab?.decky && tab?.qAMVisibilitySetter) tab?.qAMVisibilitySetter(visible); + if (tab?.decky) { + if (tab?.qAMVisibilitySetter) { + tab?.qAMVisibilitySetter(visible); + } else { + tab.initialVisibility = visible; + } + } } return; } @@ -138,12 +144,9 @@ class TabsHook extends Logger { title, tab: icon, decky: true, + initialVisibility: visible, }; - tab.panel = ( - - {content} - - ); + tab.panel = {content}; existingTabs.push(tab); } } -- cgit v1.2.3