Skip to content

Commit

Permalink
fix(digital-guide): infinite image carousel with 1 image (#560)
Browse files Browse the repository at this point in the history
* fix(digital-guide): infinite 1 image carousel

* refactor: meet PR requirements
  • Loading branch information
tomasz-trela authored Jan 26, 2025
1 parent ac385a6 commit 66a7c54
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,14 @@ class DigitalGuidePhotoRow extends StatelessWidget {
DigitalGuideConfig.borderRadiusMedium,
),
child: GestureDetector(
onTap: () async => showGallery(context, initId: id),
onTap: () async {
if (imagesIDs.length > 1) {
await showGallery(context, initId: id);
}
},
child: DigitalGuideImage(
id: id,
zoomable: false,
zoomable: imagesIDs.length == 1,
),
),
),
Expand Down

0 comments on commit 66a7c54

Please sign in to comment.