disable thumbhash for local assets

better update condition

load from provider first

show thumbhash for merged assets when scrubbing

fix disposal
This commit is contained in:
mertalev
2025-07-26 16:35:18 -04:00
parent 97a6c6d7a0
commit b81081e777
2 changed files with 49 additions and 19 deletions
@@ -78,16 +78,34 @@ class ThumbnailTile extends ConsumerWidget {
tag: '${asset?.heroTag ?? ''}_$heroIndex',
child: Thumbnail.fromBaseAsset(
asset: asset,
thumbhashMode: isScrubbing ? ThumbhashMode.only : ThumbhashMode.enabled,
thumbhashMode: isScrubbing
? ThumbhashMode.only
: asset != null && asset.hasLocal
? ThumbhashMode.disabled
: ThumbhashMode.enabled,
),
),
),
if (hasStack)
Align(
alignment: Alignment.topRight,
child: Padding(
padding: EdgeInsets.only(right: 10.0, top: asset.isVideo ? 24.0 : 6.0),
child: const _TileOverlayIcon(Icons.burst_mode_rounded),
asset.isVideo
? const Align(
alignment: Alignment.topRight,
child: Padding(
padding: EdgeInsets.only(
right: 10.0,
top: 24.0,
),
child: _TileOverlayIcon(Icons.burst_mode_rounded),
),
)
: const Align(
alignment: Alignment.topRight,
child: Padding(
padding: EdgeInsets.only(
right: 10.0,
top: 6.0,
),
child: _TileOverlayIcon(Icons.burst_mode_rounded),
),
),
if (asset != null && asset.isVideo)