diff --git a/src/components/PhotoSwipe/PhotoSwipe.tsx b/src/components/PhotoSwipe/PhotoSwipe.tsx
index f66c8f5e3..1dadd5d6e 100644
--- a/src/components/PhotoSwipe/PhotoSwipe.tsx
+++ b/src/components/PhotoSwipe/PhotoSwipe.tsx
@@ -91,9 +91,11 @@ const renderInfoItem = (label: string, value: string | JSX.Element) => (
);
function RenderCreationTime({
+ shouldDisableEdits,
file,
scheduleUpdate,
}: {
+ shouldDisableEdits: boolean;
file: EnteFile;
scheduleUpdate: () => void;
}) {
@@ -160,24 +162,25 @@ function RenderCreationTime({
- {!isInEditMode ? (
-
-
-
- ) : (
- <>
-
- {loading ? (
-
- ) : (
-
- )}
+ {!shouldDisableEdits &&
+ (!isInEditMode ? (
+
+
-
-
-
- >
- )}
+ ) : (
+ <>
+
+ {loading ? (
+
+ ) : (
+
+ )}
+
+
+
+
+ >
+ ))}
>
@@ -275,9 +278,11 @@ const FileNameEditForm = ({ filename, saveEdits, discardEdits, extension }) => {
};
function RenderFileName({
+ shouldDisableEdits,
file,
scheduleUpdate,
}: {
+ shouldDisableEdits: boolean;
file: EnteFile;
scheduleUpdate: () => void;
}) {
@@ -322,13 +327,18 @@ function RenderFileName({
{getFileTitle(filename, extension)}
-
-
-
-
-
+ {!shouldDisableEdits && (
+
+
+
+
+
+ )}
>
) : (
)}
{metadata?.creationTime && (
@@ -744,6 +757,7 @@ function PhotoSwipe(props: Iprops) {