mobile: wrap thumbnail image with renderboundary
This commit is contained in:
parent
ce2ecbea40
commit
9e63554889
2 changed files with 22 additions and 20 deletions
|
@ -142,24 +142,26 @@ class ImmichAssetGridViewState extends State<ImmichAssetGridView> {
|
|||
) {
|
||||
return isScrolling
|
||||
? _getPlaceholder(asset)
|
||||
: ThumbnailImage(
|
||||
asset: asset,
|
||||
index: index,
|
||||
loadAsset: widget.renderList.loadAsset,
|
||||
totalAssets: widget.renderList.totalAssets,
|
||||
multiselectEnabled: widget.selectionActive,
|
||||
isSelected:
|
||||
widget.selectionActive && _selectedAssets.contains(asset),
|
||||
onSelect: () => _selectAssets([asset]),
|
||||
onDeselect: widget.canDeselect ||
|
||||
widget.preselectedAssets == null ||
|
||||
!widget.preselectedAssets!.contains(asset)
|
||||
? () => _deselectAssets([asset])
|
||||
: null,
|
||||
useGrayBoxPlaceholder: true,
|
||||
showStorageIndicator: widget.showStorageIndicator,
|
||||
heroOffset: widget.heroOffset,
|
||||
showStack: widget.showStack,
|
||||
: RepaintBoundary(
|
||||
child: ThumbnailImage(
|
||||
asset: asset,
|
||||
index: index,
|
||||
loadAsset: widget.renderList.loadAsset,
|
||||
totalAssets: widget.renderList.totalAssets,
|
||||
multiselectEnabled: widget.selectionActive,
|
||||
isSelected:
|
||||
widget.selectionActive && _selectedAssets.contains(asset),
|
||||
onSelect: () => _selectAssets([asset]),
|
||||
onDeselect: widget.canDeselect ||
|
||||
widget.preselectedAssets == null ||
|
||||
!widget.preselectedAssets!.contains(asset)
|
||||
? () => _deselectAssets([asset])
|
||||
: null,
|
||||
useGrayBoxPlaceholder: true,
|
||||
showStorageIndicator: widget.showStorageIndicator,
|
||||
heroOffset: widget.heroOffset,
|
||||
showStack: widget.showStack,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -123,8 +123,8 @@ class ImmichImage extends StatelessWidget {
|
|||
cacheKey: getThumbnailCacheKey(asset, type: type),
|
||||
),
|
||||
fit: fit,
|
||||
duration: const Duration(milliseconds: 500),
|
||||
syncDuration: const Duration(milliseconds: 500),
|
||||
duration: const Duration(milliseconds: 300),
|
||||
syncDuration: const Duration(milliseconds: 300),
|
||||
placeholder: placeholderWidget,
|
||||
errorBuilder: (context, error) {
|
||||
if (error is HttpExceptionWithStatus &&
|
||||
|
|
Loading…
Reference in a new issue