Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(core): sidebar can not be collapsed on mobile (#8475)

JimmFly040956279a5a
diff --git a/packages/frontend/core/src/modules/app-sidebar/views/index.tsx b/packages/frontend/core/src/modules/app-sidebar/views/index.tsx
index c74adfd11e..4bdf913429 100644
--- a/packages/frontend/core/src/modules/app-sidebar/views/index.tsx
+++ b/packages/frontend/core/src/modules/app-sidebar/views/index.tsx
@@ -90,6 +90,7 @@ export function AppSidebar({ children }: PropsWithChildren) {
}
const dOnResize = debounce(onResize, 50);
+ onResize();
window.addEventListener('resize', dOnResize);
return () => {
window.removeEventListener('resize', dOnResize);