diff --git a/lib/ui/gallery.dart b/lib/ui/gallery.dart index dc39a4819..e3fa8f01b 100644 --- a/lib/ui/gallery.dart +++ b/lib/ui/gallery.dart @@ -130,7 +130,10 @@ class _GalleryState extends State { Widget _buildPhoto(BuildContext context, Photo photo) { Widget thumbnail; if (_openedPhoto == null || _openedPhoto == photo) { - thumbnail = Hero(tag: photo.hashCode, child: ThumbnailWidget(photo)); + thumbnail = Hero( + tag: photo.generatedId.toString(), + child: ThumbnailWidget(photo), + ); } else { thumbnail = ThumbnailWidget(photo); } diff --git a/lib/ui/zoomable_image.dart b/lib/ui/zoomable_image.dart index 1ca5ecc49..6d3ed9f91 100644 --- a/lib/ui/zoomable_image.dart +++ b/lib/ui/zoomable_image.dart @@ -100,8 +100,8 @@ class _ZoomableImageState extends State minScale: PhotoViewComputedScale.contained, gaplessPlayback: true, heroAttributes: PhotoViewHeroAttributes( - tag: widget.photo.localId ?? - "uploaded_" + widget.photo.uploadedFileId.toString()), + tag: widget.photo.generatedId.toString(), + ), ); } else { return loadWidget;