Skip to content

armgit / ente

Public Imported from GitHub
0

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

chore(gallery):removed-notification-navigation

Aswin Asoke161a40ed770
diff --git a/web/apps/photos/src/components/AlbumAddedNotification.tsx b/web/apps/photos/src/components/AlbumAddedNotification.tsx
index 6cd3da79f7..3d7b4808e7 100644
--- a/web/apps/photos/src/components/AlbumAddedNotification.tsx
+++ b/web/apps/photos/src/components/AlbumAddedNotification.tsx
@@ -1,4 +1,3 @@
-import ArrowForwardIcon from "@mui/icons-material/ArrowForward";
import CloseIcon from "@mui/icons-material/Close";
import {
Box,
@@ -20,20 +19,16 @@ interface AlbumAddedNotificationProps {
phase: AddToAlbumPhase;
/** The destination album name to show as subtitle (truncated). */
albumName?: string;
- /** Called when the arrow CTA is clicked to navigate to the album. */
- onArrowClick?: () => void;
}
/**
* Success notification shown after files are added to an album.
- * Provides navigation to the album via an arrow button.
*/
export const AlbumAddedNotification: React.FC<AlbumAddedNotificationProps> = ({
open,
onClose,
phase,
albumName,
- onArrowClick,
}) => {
// Only show the toast once the operation completes successfully.
const shouldShow = open && phase === "done";
@@ -71,16 +66,6 @@ export const AlbumAddedNotification: React.FC<AlbumAddedNotificationProps> = ({
)}
</Box>
<Stack direction="row" sx={{ gap: 1 }}>
- {onArrowClick && (
- <FilledIconButton
- onClick={() => {
- onClose();
- onArrowClick();
- }}
- >
- <ArrowForwardIcon />
- </FilledIconButton>
- )}
<FilledIconButton
onClick={onClose}
aria-label={t("close")}
diff --git a/web/apps/photos/src/pages/gallery.tsx b/web/apps/photos/src/pages/gallery.tsx
index 7f1b86d8a1..d5711fa1be 100644
--- a/web/apps/photos/src/pages/gallery.tsx
+++ b/web/apps/photos/src/pages/gallery.tsx
@@ -179,7 +179,6 @@ const Page: React.FC = () => {
const pendingSingleFileAdd = useRef<
{ file: EnteFile; sourceCollectionSummaryID?: number } | undefined
>(undefined);
- const closeFileViewerRef = useRef<(() => void) | undefined>(undefined);
/**
* A queue to serialize calls to {@link remoteFilesPull}.
*/
@@ -1014,10 +1013,6 @@ const Page: React.FC = () => {
[],
);
- const registerCloseFileViewer = useCallback((closer?: () => void) => {
- closeFileViewerRef.current = closer;
- }, []);
-
const handleCloseCollectionSelector = useCallback(
() => setOpenCollectionSelector(false),
[],
@@ -1317,7 +1312,6 @@ const Page: React.FC = () => {
onSelectCollection={handleSelectCollection}
onSelectPerson={handleSelectPerson}
onAddFileToCollection={handleAddSingleFileToCollection}
- onRegisterCloseFileViewer={registerCloseFileViewer}
/>
)}
<Export {...exportVisibilityProps} {...{ collectionNameByID }} />
@@ -1346,12 +1340,6 @@ const Page: React.FC = () => {
}
phase={addToAlbumProgress.phase}
albumName={addToAlbumProgress.albumName}
- onArrowClick={() => {
- closeFileViewerRef.current?.();
- if (addToAlbumProgress.albumId !== undefined) {
- handleSelectCollection(addToAlbumProgress.albumId);
- }
- }}
/>
</FullScreenDropZone>
);