Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(mobile): Revert thumbnail image ui improvements (#13655) #13806

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 32 additions & 54 deletions mobile/lib/widgets/asset_grid/thumbnail_image.dart
Original file line number Diff line number Diff line change
Expand Up @@ -138,31 +138,10 @@ class ThumbnailImage extends ConsumerWidget {
tag: isFromDto
? '${asset.remoteId}-$heroOffset'
: asset.id + heroOffset,
child: Stack(
children: [
ImmichThumbnail(
asset: asset,
height: 250,
width: 250,
),
Container(
height: 250,
width: 250,
decoration: const BoxDecoration(
gradient: LinearGradient(
colors: [
Color.fromRGBO(0, 0, 0, 0.1),
Colors.transparent,
Colors.transparent,
Color.fromRGBO(0, 0, 0, 0.1),
],
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
stops: [0, 0.3, 0.6, 1],
),
),
),
],
child: ImmichThumbnail(
asset: asset,
height: 250,
width: 250,
),
),
);
Expand All @@ -174,8 +153,11 @@ class ThumbnailImage extends ConsumerWidget {
color: canDeselect ? assetContainerColor : Colors.grey,
),
child: ClipRRect(
borderRadius: const BorderRadius.all(
Radius.circular(15.0),
borderRadius: const BorderRadius.only(
topRight: Radius.circular(15.0),
bottomRight: Radius.circular(15.0),
bottomLeft: Radius.circular(15.0),
topLeft: Radius.zero,
),
child: image,
),
Expand All @@ -195,33 +177,7 @@ class ThumbnailImage extends ConsumerWidget {
)
: const Border(),
),
child: Stack(
children: [
buildImage(),
if (showStorageIndicator)
Positioned(
right: 8,
bottom: 5,
child: Icon(
storageIcon(asset),
color: Colors.white.withOpacity(.8),
size: 16,
),
),
if (asset.isFavorite)
const Positioned(
left: 8,
bottom: 5,
child: Icon(
Icons.favorite,
color: Colors.white,
size: 16,
),
),
if (!asset.isImage) buildVideoIcon(),
if (asset.stackCount > 0) buildStackIcon(),
],
),
child: buildImage(),
),
if (multiselectEnabled)
Padding(
Expand All @@ -231,6 +187,28 @@ class ThumbnailImage extends ConsumerWidget {
child: buildSelectionIcon(asset),
),
),
if (showStorageIndicator)
Positioned(
right: 8,
bottom: 5,
child: Icon(
storageIcon(asset),
color: Colors.white.withOpacity(.8),
size: 16,
),
),
if (asset.isFavorite)
const Positioned(
left: 8,
bottom: 5,
child: Icon(
Icons.favorite,
color: Colors.white,
size: 18,
),
),
if (!asset.isImage) buildVideoIcon(),
if (asset.stackCount > 0) buildStackIcon(),
],
);
}
Expand Down
Loading