Skip to content

armgit / ente

Public Imported from GitHub
0

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

fix(EditLocationDialog):auto-modal-close

Aswin Asokff9bade97f11
diff --git a/web/packages/new/photos/components/EditLocationDialog.tsx b/web/packages/new/photos/components/EditLocationDialog.tsx
index 843480c1bc..e30580c0ec 100644
--- a/web/packages/new/photos/components/EditLocationDialog.tsx
+++ b/web/packages/new/photos/components/EditLocationDialog.tsx
@@ -125,6 +125,14 @@ export const EditLocationDialog: React.FC<EditLocationDialogProps> = ({
}
};
+ useEffect(() => {
+ if (!open || !isSuccess) return;
+ const timeoutId = setTimeout(() => {
+ onClose();
+ }, 1000);
+ return () => clearTimeout(timeoutId);
+ }, [open, isSuccess, onClose]);
+
return (
<Dialog
{...{ open, onClose, fullScreen }}
diff --git a/web/packages/new/photos/components/FileContextMenu.tsx b/web/packages/new/photos/components/FileContextMenu.tsx
index 94ef7977af..31cc8722e2 100644
--- a/web/packages/new/photos/components/FileContextMenu.tsx
+++ b/web/packages/new/photos/components/FileContextMenu.tsx
@@ -14,7 +14,6 @@ import VisibilityOutlinedIcon from "@mui/icons-material/VisibilityOutlined";
import type { SvgIconProps } from "@mui/material";
import {
Box,
- Divider,
ListItemIcon,
ListItemText,
Menu,
@@ -137,9 +136,6 @@ export const FileContextMenu: React.FC<FileContextMenuProps> = memo(
</StyledMenuItem>
);
})}
- {destructiveActions.length > 0 && primaryActions.length > 0 && (
- <Divider />
- )}
{destructiveActions.map((action) => {
const { label, Icon } = actionConfigs[action];