Skip to content

armgit / ente

Public Imported from GitHub
0

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

Use the dialog's loader and error indicator

Manav Rathi02f3afc4ccaa
diff --git a/web/apps/photos/src/components/PhotoViewer/index.tsx b/web/apps/photos/src/components/PhotoViewer/index.tsx
index f0d7fcae19..31df61424a 100644
--- a/web/apps/photos/src/components/PhotoViewer/index.tsx
+++ b/web/apps/photos/src/components/PhotoViewer/index.tsx
@@ -522,19 +522,10 @@ export const PhotoViewer: React.FC<PhotoViewerProps> = ({
};
const trashFile = async (file: DisplayFile) => {
- try {
- showLoadingBar();
- try {
- await moveToTrash([file]);
- } finally {
- hideLoadingBar();
- }
- markTempDeleted?.([file]);
- updateItems(items.filter((item) => item.id !== file.id));
- needUpdate.current = true;
- } catch (e) {
- log.error("trashFile failed", e);
- }
+ await moveToTrash([file]);
+ markTempDeleted?.([file]);
+ updateItems(items.filter((item) => item.id !== file.id));
+ needUpdate.current = true;
};
const confirmDeleteFile = (file: EnteFile) => {