From c021947d529ee3bea5747eddfc66d56110c65e7d Mon Sep 17 00:00:00 2001 From: Phantom Date: Wed, 22 Oct 2025 01:15:25 +0800 Subject: [PATCH] fix(home-tabs): correct tab switching logic for left position (#10858) Ensure proper tab switching when position is left and topicPosition is right by including 'settings' tab in the condition --- src/renderer/src/pages/home/Tabs/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/pages/home/Tabs/index.tsx b/src/renderer/src/pages/home/Tabs/index.tsx index 33d6473432..775a045d95 100644 --- a/src/renderer/src/pages/home/Tabs/index.tsx +++ b/src/renderer/src/pages/home/Tabs/index.tsx @@ -29,7 +29,7 @@ interface Props { style?: React.CSSProperties } -let _tab: any = '' +let _tab: Tab | null = null const HomeTabs: FC = ({ activeAssistant, @@ -103,7 +103,7 @@ const HomeTabs: FC = ({ if (position === 'right' && topicPosition === 'right' && tab === 'assistants') { setTab('topic') } - if (position === 'left' && topicPosition === 'right' && tab === 'topic') { + if (position === 'left' && topicPosition === 'right' && (tab === 'topic' || tab === 'settings')) { setTab('assistants') } }, [position, tab, topicPosition, forceToSeeAllTab])