fix(ui): match loading-header placeholder heights to the loaded rows

The subtitle/meta placeholders were shorter than the real artist and
meta rows, so the cover shifted ~12px during the loading-to-content
crossfade and read as a ghosted double image.
This commit is contained in:
zarzet
2026-07-14 09:09:58 +07:00
parent 2d9df7e1bc
commit a10aeb76ee
+5 -4
View File
@@ -1009,13 +1009,14 @@ class _AlbumLoadingScaffoldState extends State<_AlbumLoadingScaffold>
heroTag: widget.heroTag,
background: cover(),
coverBuilder: (context, coverSize) => cover(),
// Placeholder rows sized like the loaded header's subtitle, meta,
// and action rows so the cover barely shifts when content lands.
// Placeholder rows sized like the loaded header's subtitle
// (16pt artist text ≈ 22px), meta (13pt row ≈ 18px), and 48px
// action row, so the cover doesn't shift when content lands.
subtitle: const ShimmerLoading(
child: SkeletonBox(width: 120, height: 16, borderRadius: 4),
child: SkeletonBox(width: 120, height: 22, borderRadius: 4),
),
meta: const ShimmerLoading(
child: SkeletonBox(width: 150, height: 14, borderRadius: 6),
child: SkeletonBox(width: 150, height: 18, borderRadius: 6),
),
actions: const ShimmerLoading(
child: SkeletonBox(width: 220, height: 48, borderRadius: 24),