disable thumbhash for local assets

This commit is contained in:
mertalev 2025-07-26 16:35:18 -04:00
parent f92db09205
commit 60f396b599
No known key found for this signature in database
GPG Key ID: DF6ABC77AAD98C95

View File

@ -73,16 +73,34 @@ class ThumbnailTile extends ConsumerWidget {
tag: '${asset?.heroTag ?? ''}_$heroIndex', tag: '${asset?.heroTag ?? ''}_$heroIndex',
child: Thumbnail.fromBaseAsset( child: Thumbnail.fromBaseAsset(
asset: asset, asset: asset,
thumbhashMode: isScrubbing ? ThumbhashMode.only : ThumbhashMode.enabled, thumbhashMode: asset != null && asset.hasLocal
? ThumbhashMode.disabled
: isScrubbing
? ThumbhashMode.only
: ThumbhashMode.enabled,
), ),
), ),
), ),
if (hasStack) if (hasStack)
Align( asset.isVideo
alignment: Alignment.topRight, ? const Align(
child: Padding( alignment: Alignment.topRight,
padding: EdgeInsets.only(right: 10.0, top: asset.isVideo ? 24.0 : 6.0), child: Padding(
child: const _TileOverlayIcon(Icons.burst_mode_rounded), 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) if (asset != null && asset.isVideo)