Skip to content

armgit / ente

Public Imported from GitHub
0

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

Show header for pseudo-collections like All in gallery view

Anand Baburajanf53b7e637e24
diff --git a/web/apps/photos/src/components/Collections/GalleryBarAndListHeader.tsx b/web/apps/photos/src/components/Collections/GalleryBarAndListHeader.tsx
index 4ddd9dd2b4..605d96843d 100644
--- a/web/apps/photos/src/components/Collections/GalleryBarAndListHeader.tsx
+++ b/web/apps/photos/src/components/Collections/GalleryBarAndListHeader.tsx
@@ -19,6 +19,10 @@ import {
GalleryBarImpl,
type GalleryBarImplProps,
} from "ente-new/photos/components/gallery/BarImpl";
+import {
+ GalleryItemsHeaderAdapter,
+ GalleryItemsSummary,
+} from "ente-new/photos/components/gallery/ListHeader";
import { PeopleHeader } from "ente-new/photos/components/gallery/PeopleHeader";
import type { CollectionSummary } from "ente-new/photos/services/collection-summary";
import {
@@ -143,6 +147,9 @@ export const GalleryBarAndListHeader: React.FC<
useEffect(() => {
if (shouldHide) return;
+ const collectionSummary = toShowCollectionSummaries.get(
+ activeCollectionID!,
+ );
setFileListHeader({
component:
mode != "people" && activeCollection ? (
@@ -154,13 +161,18 @@ export const GalleryBarAndListHeader: React.FC<
onRemotePull,
onAddSaveGroup,
}}
- collectionSummary={
- toShowCollectionSummaries.get(activeCollectionID!)!
- }
+ collectionSummary={collectionSummary!}
onCollectionShare={showCollectionShare}
onCollectionCast={showCollectionCast}
onCollectionFeed={showCollectionFeed}
/>
+ ) : mode != "people" && collectionSummary ? (
+ <GalleryItemsHeaderAdapter>
+ <GalleryItemsSummary
+ name={collectionSummary.name}
+ fileCount={collectionSummary.fileCount}
+ />
+ </GalleryItemsHeaderAdapter>
) : activePerson ? (
<PeopleHeader
person={activePerson}