mirror of
https://github.com/ente-io/ente.git
synced 2025-08-13 01:27:17 +00:00
alt
This commit is contained in:
@@ -26,7 +26,6 @@ import {
|
||||
type FileInfoProps,
|
||||
} from "@/gallery/components/FileInfo";
|
||||
import type { Collection } from "@/media/collection";
|
||||
import { fileCaption } from "@/media/file-metadata";
|
||||
import { FileType } from "@/media/file-type";
|
||||
import type { EnteFile } from "@/media/file.js";
|
||||
import { isHEICExtension, needsJPEGConversion } from "@/media/formats";
|
||||
@@ -284,6 +283,7 @@ const FileViewer: React.FC<FileViewerProps> = ({
|
||||
const handleAnnotate = useCallback(
|
||||
(file: EnteFile): FileViewerFileAnnotation => {
|
||||
log.debug(() => ["viewer", { action: "annotate", file }]);
|
||||
|
||||
const fileID = file.id;
|
||||
const isOwnFile = file.ownerID == user?.id;
|
||||
const canModify =
|
||||
@@ -293,14 +293,12 @@ const FileViewer: React.FC<FileViewerProps> = ({
|
||||
handleEditImage && canModify
|
||||
? fileIsEditableImage(file)
|
||||
: undefined;
|
||||
const caption = fileCaption(file);
|
||||
|
||||
return {
|
||||
fileID,
|
||||
isOwnFile,
|
||||
showFavorite,
|
||||
isEditableImage,
|
||||
caption,
|
||||
};
|
||||
},
|
||||
[user, isInTrashSection, isInHiddenSection, handleEditImage],
|
||||
|
Reference in New Issue
Block a user