fix(library): optimize image scanning, fast raw preview extraction and lazy thumbnail loading
This commit is contained in:
@@ -936,6 +936,24 @@ export function Workspace() {
|
||||
void forgetPhoto();
|
||||
}, [clearPreview]);
|
||||
|
||||
// Clean up Object URLs when App unmounts (e.g. SPA navigation to Library)
|
||||
useEffect(() => {
|
||||
return () => {
|
||||
setPreviewUrl((prev) => {
|
||||
if (prev) URL.revokeObjectURL(prev);
|
||||
return null;
|
||||
});
|
||||
setCompareUrl((prev) => {
|
||||
if (prev) URL.revokeObjectURL(prev);
|
||||
return null;
|
||||
});
|
||||
setSource((prev) => {
|
||||
if (prev) URL.revokeObjectURL(prev.url);
|
||||
return null;
|
||||
});
|
||||
};
|
||||
}, []);
|
||||
|
||||
// What the phone app gets from the OS geocoder, the browser has no twin of,
|
||||
// so the name behind a coordinate comes from the API. Fire and forget: the
|
||||
// stamp is already readable without it, and a name that arrives late (or not
|
||||
|
||||
Reference in New Issue
Block a user