mirror of
https://github.com/ente-io/ente.git
synced 2025-07-26 11:29:13 +00:00
Inline
This commit is contained in:
parent
02f3afc4cc
commit
1a3d665655
@ -521,13 +521,6 @@ export const PhotoViewer: React.FC<PhotoViewerProps> = ({
|
|||||||
needUpdate.current = true;
|
needUpdate.current = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
const trashFile = async (file: DisplayFile) => {
|
|
||||||
await moveToTrash([file]);
|
|
||||||
markTempDeleted?.([file]);
|
|
||||||
updateItems(items.filter((item) => item.id !== file.id));
|
|
||||||
needUpdate.current = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
const confirmDeleteFile = (file: EnteFile) => {
|
const confirmDeleteFile = (file: EnteFile) => {
|
||||||
if (!file || !isOwnFile || isTrashCollection) {
|
if (!file || !isOwnFile || isTrashCollection) {
|
||||||
return;
|
return;
|
||||||
@ -537,8 +530,12 @@ export const PhotoViewer: React.FC<PhotoViewerProps> = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleDeleteFile = async () => {
|
const handleDeleteFile = async () => {
|
||||||
await trashFile(fileToDelete!);
|
const file = fileToDelete!;
|
||||||
|
await moveToTrash([file]);
|
||||||
|
markTempDeleted?.([file]);
|
||||||
|
updateItems(items.filter((item) => item.id !== file.id));
|
||||||
setFileToDelete(undefined);
|
setFileToDelete(undefined);
|
||||||
|
needUpdate.current = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleArrowClick = (
|
const handleArrowClick = (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user