Skip to content

armgit / ente

Public Imported from GitHub
0

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

refractor(CollectionDialogBox):update-loader-on-loadMapData

Aswin Asokcbccddf9c29d
diff --git a/web/apps/photos/src/components/Collections/CollectionMapDialog.tsx b/web/apps/photos/src/components/Collections/CollectionMapDialog.tsx
index efb436e179..c7462fd265 100644
--- a/web/apps/photos/src/components/Collections/CollectionMapDialog.tsx
+++ b/web/apps/photos/src/components/Collections/CollectionMapDialog.tsx
@@ -267,6 +267,11 @@ function useMapData(
error: t("something_went_wrong"),
}));
onGenericError(e);
+ } finally {
+ // Ensure we never leave the dialog stuck in a loading state
+ setState((prev) =>
+ prev.isLoading ? { ...prev, isLoading: false } : prev,
+ );
}
};