fix(mobile): close settings drawers and remove extra top spacing (#770)

* fix(mobile): close side drawers when opening settings

* fix(mobile): remove duplicate top inset in drawers

---------

Co-authored-by: Jovines <jovines@qq.com>
This commit is contained in:
Jovines
2026-04-01 15:32:32 +03:00
committed by GitHub
co-authored by Jovines
parent 81c41388ac
commit f032df2298
3 changed files with 25 additions and 3 deletions
@@ -145,6 +145,21 @@ export const MainLayout: React.FC = () => {
}
}, [isSessionSwitcherOpen, isMobile]);
// Ensure mobile drawers are closed when opening full-screen settings
useEffect(() => {
if (!isMobile || !isSettingsDialogOpen) {
return;
}
setMobileLeftDrawerOpen(false);
if (isSessionSwitcherOpen) {
useUIStore.getState().setSessionSwitcherOpen(false);
}
if (isRightSidebarOpen) {
setRightSidebarOpen(false);
}
}, [isMobile, isSettingsDialogOpen, isSessionSwitcherOpen, isRightSidebarOpen, setRightSidebarOpen]);
// Sync right drawer and git sidebar state
useEffect(() => {
if (isMobile) {