Skip to content

armgit / ente

Public Imported from GitHub
0

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

Rename

Manav Rathiee8ce5064908
diff --git a/web/packages/base/components/MiniDialog.tsx b/web/packages/base/components/MiniDialog.tsx
index 4da3333613..b6b920126f 100644
--- a/web/packages/base/components/MiniDialog.tsx
+++ b/web/packages/base/components/MiniDialog.tsx
@@ -58,7 +58,7 @@ export interface MiniDialogAttributes {
*
* Use this flag sparingly.
*/
- disablePreemption?: boolean;
+ nonReplaceable?: boolean;
/**
* Customize the primary action button shown in the dialog.
*
diff --git a/web/packages/base/components/utils/dialog.tsx b/web/packages/base/components/utils/dialog.tsx
index 0a4237a8a0..04cdc48711 100644
--- a/web/packages/base/components/utils/dialog.tsx
+++ b/web/packages/base/components/utils/dialog.tsx
@@ -17,13 +17,9 @@ export const useAttributedMiniDialog = () => {
const showMiniDialog = useCallback(
(newAttributes: MiniDialogAttributes) => {
- setAttributes((attributes) => {
- if (attributes?.disablePreemption) {
- // Don't replace a dialog that set the disablePreemption flag.
- return attributes;
- }
- return newAttributes;
- });
+ setAttributes((attributes) =>
+ attributes?.nonReplaceable ? attributes : newAttributes,
+ );
setOpen(true);
},
[],