mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
fix(mobile): cache key for assets from dto (#4699)
Co-authored-by: shalong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
@@ -90,7 +90,7 @@ class GalleryViewerPage extends HookConsumerWidget {
|
||||
: <Asset>[];
|
||||
final stackElements = showStack ? [currentAsset, ...stack] : <Asset>[];
|
||||
// Assets from response DTOs do not have an isar id, querying which would give us the default autoIncrement id
|
||||
final isFromResponse = currentAsset.id == Isar.autoIncrement;
|
||||
final isFromDto = currentAsset.id == Isar.autoIncrement;
|
||||
|
||||
Asset asset() => stackIndex.value == -1
|
||||
? currentAsset
|
||||
@@ -773,7 +773,7 @@ class GalleryViewerPage extends HookConsumerWidget {
|
||||
},
|
||||
imageProvider: provider,
|
||||
heroAttributes: PhotoViewHeroAttributes(
|
||||
tag: isFromResponse
|
||||
tag: isFromDto
|
||||
? '${a.remoteId}-$heroOffset'
|
||||
: a.id + heroOffset,
|
||||
),
|
||||
@@ -792,7 +792,7 @@ class GalleryViewerPage extends HookConsumerWidget {
|
||||
onDragUpdate: (_, details, __) =>
|
||||
handleSwipeUpDown(details),
|
||||
heroAttributes: PhotoViewHeroAttributes(
|
||||
tag: isFromResponse
|
||||
tag: isFromDto
|
||||
? '${a.remoteId}-$heroOffset'
|
||||
: a.id + heroOffset,
|
||||
),
|
||||
|
||||
@@ -45,7 +45,7 @@ class ThumbnailImage extends StatelessWidget {
|
||||
final assetContainerColor =
|
||||
isDarkTheme ? Colors.blueGrey : Theme.of(context).primaryColorLight;
|
||||
// Assets from response DTOs do not have an isar id, querying which would give us the default autoIncrement id
|
||||
final isFromResponse = asset.id == Isar.autoIncrement;
|
||||
final isFromDto = asset.id == Isar.autoIncrement;
|
||||
|
||||
Widget buildSelectionIcon(Asset asset) {
|
||||
if (isSelected) {
|
||||
@@ -134,7 +134,7 @@ class ThumbnailImage extends StatelessWidget {
|
||||
width: 300,
|
||||
height: 300,
|
||||
child: Hero(
|
||||
tag: isFromResponse
|
||||
tag: isFromDto
|
||||
? '${asset.remoteId}-$heroOffset'
|
||||
: asset.id + heroOffset,
|
||||
child: ImmichImage(
|
||||
|
||||
Reference in New Issue
Block a user