summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-02-07 05:05:33 -0800
committerFuwn <[email protected]>2026-02-07 05:05:33 -0800
commita6974c6a6213db04767c2990763bc3a79ded0e30 (patch)
tree9d8d751c8d24e0bc6d26411fdc4e6bc7a0193606 /apps
parentfix: api key prefix rename, revoke fix, and webhook validation (diff)
downloadasa.news-a6974c6a6213db04767c2990763bc3a79ded0e30.tar.xz
asa.news-a6974c6a6213db04767c2990763bc3a79ded0e30.zip
fix: persist sidebar size across collapse/expand cycles
When sidebar is collapsed, the Group fires onLayoutChanged with only main-content, overwriting the stored sidebar size. Pass undefined for onLayoutChanged when collapsed so the stored layout is preserved.
Diffstat (limited to 'apps')
-rw-r--r--apps/web/app/reader/_components/reader-layout-shell.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/web/app/reader/_components/reader-layout-shell.tsx b/apps/web/app/reader/_components/reader-layout-shell.tsx
index b32d105..4952662 100644
--- a/apps/web/app/reader/_components/reader-layout-shell.tsx
+++ b/apps/web/app/reader/_components/reader-layout-shell.tsx
@@ -306,7 +306,7 @@ export function ReaderLayoutShell({
<Group
orientation="horizontal"
defaultLayout={sidebarLayout.defaultLayout}
- onLayoutChanged={sidebarLayout.onLayoutChanged}
+ onLayoutChanged={isSidebarCollapsed ? undefined : sidebarLayout.onLayoutChanged}
>
{!isSidebarCollapsed && (
<>