Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

fix(photos):preserve-hidden-and-archive-drawers

Aswin Asoke5dbaef96dc4
diff --git a/web/apps/photos/src/components/gallery/PhotosNavigationShell.tsx b/web/apps/photos/src/components/gallery/PhotosNavigationShell.tsx
index eb106fe7dd..b041ab8a85 100644
--- a/web/apps/photos/src/components/gallery/PhotosNavigationShell.tsx
+++ b/web/apps/photos/src/components/gallery/PhotosNavigationShell.tsx
@@ -72,9 +72,21 @@ export const PhotosNavigationShell: React.FC<
const { onClose: closeMobileNavigation } = mobileDrawerProps;
useEffect(() => {
if (!mobile) closeMobileNavigation();
- }, [mobile, closeMobileNavigation]);
+ else if (
+ props.mode == "hidden-albums" ||
+ props.mode == "archive-albums"
+ ) {
+ showMobileNavigation();
+ }
+ }, [mobile, props.mode, closeMobileNavigation, showMobileNavigation]);
const handleChangeMode = (mode: GalleryBarMode) => {
- props.onChangeMode(mode);
+ const reopeningSection =
+ mobile &&
+ mode == "albums" &&
+ galleryBarProps &&
+ !props.isInSearchMode &&
+ (props.mode == "hidden-albums" || props.mode == "archive-albums");
+ if (!reopeningSection) props.onChangeMode(mode);
if (mobile) showMobileNavigation();
};
return (