Skip to content

armgit / ente

Public Imported from GitHub
0

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

chore(gallery):removed-notification-navigation-unused-functions

Aswin Asok26438af7399b
diff --git a/web/apps/photos/src/components/FileListWithViewer.tsx b/web/apps/photos/src/components/FileListWithViewer.tsx
index 4f8c33a7e4..945c9c6105 100644
--- a/web/apps/photos/src/components/FileListWithViewer.tsx
+++ b/web/apps/photos/src/components/FileListWithViewer.tsx
@@ -13,7 +13,7 @@ import { fileCreationTime, fileFileName } from "ente-media/file-metadata";
import { moveToTrash } from "ente-new/photos/services/collection";
import { PseudoCollectionID } from "ente-new/photos/services/collection-summary";
import { t } from "i18next";
-import { useCallback, useEffect, useMemo, useState } from "react";
+import { useCallback, useMemo, useState } from "react";
import AutoSizer from "react-virtualized-auto-sizer";
import { uploadManager } from "services/upload-manager";
import {
@@ -57,11 +57,6 @@ export type FileListWithViewerProps = {
file: EnteFile,
sourceCollectionSummaryID?: number,
) => void;
- /**
- * Provides a callback that closes the file viewer, allowing parents to
- * dismiss it programmatically.
- */
- onRegisterCloseFileViewer?: (close?: () => void) => void;
} & Pick<
FileListProps,
| "mode"
@@ -132,7 +127,6 @@ export const FileListWithViewer: React.FC<FileListWithViewerProps> = ({
onSelectCollection,
onSelectPerson,
onAddFileToCollection,
- onRegisterCloseFileViewer,
}) => {
const [openFileViewer, setOpenFileViewer] = useState(false);
const [currentIndex, setCurrentIndex] = useState(0);
@@ -160,12 +154,6 @@ export const FileListWithViewer: React.FC<FileListWithViewerProps> = ({
setOpenFileViewer(false);
}, [onSetOpenFileViewer]);
- useEffect(() => {
- if (!onRegisterCloseFileViewer) return;
- onRegisterCloseFileViewer(handleCloseFileViewer);
- return () => onRegisterCloseFileViewer(undefined);
- }, [onRegisterCloseFileViewer, handleCloseFileViewer]);
-
const handleTriggerRemotePull = useCallback(
() => void onRemotePull(),
[onRemotePull],