Skip to content

Commit 143ee0b

Browse files
authored
fix(mobile): Revert thumbnail image ui improvements (#13655) (#13806)
Revert "chore(mobile): thumbnail image ui improvements (#13655)" This reverts commit 16f2364.
1 parent 68a4cc2 commit 143ee0b

File tree

1 file changed

+32
-54
lines changed

1 file changed

+32
-54
lines changed

Diff for: mobile/lib/widgets/asset_grid/thumbnail_image.dart

+32-54
Original file line numberDiff line numberDiff line change
@@ -138,31 +138,10 @@ class ThumbnailImage extends ConsumerWidget {
138138
tag: isFromDto
139139
? '${asset.remoteId}-$heroOffset'
140140
: asset.id + heroOffset,
141-
child: Stack(
142-
children: [
143-
ImmichThumbnail(
144-
asset: asset,
145-
height: 250,
146-
width: 250,
147-
),
148-
Container(
149-
height: 250,
150-
width: 250,
151-
decoration: const BoxDecoration(
152-
gradient: LinearGradient(
153-
colors: [
154-
Color.fromRGBO(0, 0, 0, 0.1),
155-
Colors.transparent,
156-
Colors.transparent,
157-
Color.fromRGBO(0, 0, 0, 0.1),
158-
],
159-
begin: Alignment.topCenter,
160-
end: Alignment.bottomCenter,
161-
stops: [0, 0.3, 0.6, 1],
162-
),
163-
),
164-
),
165-
],
141+
child: ImmichThumbnail(
142+
asset: asset,
143+
height: 250,
144+
width: 250,
166145
),
167146
),
168147
);
@@ -174,8 +153,11 @@ class ThumbnailImage extends ConsumerWidget {
174153
color: canDeselect ? assetContainerColor : Colors.grey,
175154
),
176155
child: ClipRRect(
177-
borderRadius: const BorderRadius.all(
178-
Radius.circular(15.0),
156+
borderRadius: const BorderRadius.only(
157+
topRight: Radius.circular(15.0),
158+
bottomRight: Radius.circular(15.0),
159+
bottomLeft: Radius.circular(15.0),
160+
topLeft: Radius.zero,
179161
),
180162
child: image,
181163
),
@@ -195,33 +177,7 @@ class ThumbnailImage extends ConsumerWidget {
195177
)
196178
: const Border(),
197179
),
198-
child: Stack(
199-
children: [
200-
buildImage(),
201-
if (showStorageIndicator)
202-
Positioned(
203-
right: 8,
204-
bottom: 5,
205-
child: Icon(
206-
storageIcon(asset),
207-
color: Colors.white.withOpacity(.8),
208-
size: 16,
209-
),
210-
),
211-
if (asset.isFavorite)
212-
const Positioned(
213-
left: 8,
214-
bottom: 5,
215-
child: Icon(
216-
Icons.favorite,
217-
color: Colors.white,
218-
size: 16,
219-
),
220-
),
221-
if (!asset.isImage) buildVideoIcon(),
222-
if (asset.stackCount > 0) buildStackIcon(),
223-
],
224-
),
180+
child: buildImage(),
225181
),
226182
if (multiselectEnabled)
227183
Padding(
@@ -231,6 +187,28 @@ class ThumbnailImage extends ConsumerWidget {
231187
child: buildSelectionIcon(asset),
232188
),
233189
),
190+
if (showStorageIndicator)
191+
Positioned(
192+
right: 8,
193+
bottom: 5,
194+
child: Icon(
195+
storageIcon(asset),
196+
color: Colors.white.withOpacity(.8),
197+
size: 16,
198+
),
199+
),
200+
if (asset.isFavorite)
201+
const Positioned(
202+
left: 8,
203+
bottom: 5,
204+
child: Icon(
205+
Icons.favorite,
206+
color: Colors.white,
207+
size: 18,
208+
),
209+
),
210+
if (!asset.isImage) buildVideoIcon(),
211+
if (asset.stackCount > 0) buildStackIcon(),
234212
],
235213
);
236214
}

0 commit comments

Comments
 (0)