fix(library): a server's frames stand at the shape the server stated, not at a guess

This commit is contained in:
2026-10-13 18:50:47 +07:00
parent c25b8569a7
commit 976ec2cd37
4 changed files with 56 additions and 6 deletions
+10 -2
View File
@@ -2101,7 +2101,10 @@ function Catalogue({ admin, user }: { admin: boolean; user: User | null }) {
let sum = 0;
for (const ar of wallAr.values()) sum += ar;
const fallback = wallAr.size ? sum / wallAr.size : WALL_AR;
return listed.map((photo) => wallAr.get(photo.id) ?? fallback);
// A frame Immich holds already said its own shape, so it is measured off
// nothing and stays where it was laid: `wallAr` is for the frames on the disk,
// which nobody has opened yet.
return listed.map((photo) => photo.ar ?? wallAr.get(photo.id) ?? fallback);
// `arsAt` is the shape map having grown: the numbers are read off it and not
// off the list, so nothing else here would make the shelf look again.
}, [listed, arsAt]);
@@ -3320,7 +3323,12 @@ function Catalogue({ admin, user }: { admin: boolean; user: User | null }) {
}}
onContextMenu={(e) => handlePhotoContextMenu(photo, e)}
>
{tile(photo, undefined, (ar) => onAr(photo.id, ar))}
{tile(photo, undefined, (ar) => {
// Only a frame whose shape is not known
// already is worth laying the shelf out
// again for.
if (photo.ar === undefined) onAr(photo.id, ar);
})}
{/* The score over the picture, the same five
stars the stage gives: the wall is where a
roll is gone through, and going back to the