[PR #227] [MERGED] Allow zooming in image viewer #8520

Closed
opened 2026-02-05 13:48:42 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/227
Author: @matthinc
Created: 6/16/2022
Status: Merged
Merged: 6/20/2022
Merged by: @alextran1502

Base: mainHead: main


📝 Commits (6)

  • 3b8257f Allow zooming in image viewer
  • 124c547 Use thumbnailProvider as initial provider
  • bc84c6e Set maximum zoom level to 100%
  • 77029fd Implement custom swipe listener in remote_photo_view
  • e7f53cd Dart format
  • 728aa3d Disable swipe gestures when zoomed in (prevents panning)

📊 Changes

4 files changed (+125 additions, -58 deletions)

View changed files

mobile/lib/modules/asset_viewer/ui/remote_photo_view.dart (+114 -0)
📝 mobile/lib/modules/asset_viewer/views/image_viewer_page.dart (+9 -56)
📝 mobile/pubspec.lock (+1 -1)
📝 mobile/pubspec.yaml (+1 -1)

📄 Description

As discussed here I'm working on some improvements for the image viewer page.
photo_view 0.14 seems to resolve the issues of the previous versions for the newest flutter version.

By using the CachedNetworkImageProvider directly, we have more control over the loading behavior.

I decided to use the state-machine pattern for the thumbnail / full image loading process:

state_machine

That way we can avoid nasty race-conditions.

This PR contains a first (working) state. I will do the refactoring / testing next week.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/immich-app/immich/pull/227 **Author:** [@matthinc](https://github.com/matthinc) **Created:** 6/16/2022 **Status:** ✅ Merged **Merged:** 6/20/2022 **Merged by:** [@alextran1502](https://github.com/alextran1502) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (6) - [`3b8257f`](https://github.com/immich-app/immich/commit/3b8257f2da004f5d7f2cb4bf926fd63ff5d80ebc) Allow zooming in image viewer - [`124c547`](https://github.com/immich-app/immich/commit/124c5475a0656b4a634909e08189dc9d06514d73) Use thumbnailProvider as initial provider - [`bc84c6e`](https://github.com/immich-app/immich/commit/bc84c6eb2b70bdcb4629e576ee1b2cf5fcd01f7b) Set maximum zoom level to 100% - [`77029fd`](https://github.com/immich-app/immich/commit/77029fde3f00c5cd170e1dc80ae178c2616a9e30) Implement custom swipe listener in remote_photo_view - [`e7f53cd`](https://github.com/immich-app/immich/commit/e7f53cd8c35a37dd098a50306364d01b37744fcf) Dart format - [`728aa3d`](https://github.com/immich-app/immich/commit/728aa3dc716392f985c4818fd236639684cc4516) Disable swipe gestures when zoomed in (prevents panning) ### 📊 Changes **4 files changed** (+125 additions, -58 deletions) <details> <summary>View changed files</summary> ➕ `mobile/lib/modules/asset_viewer/ui/remote_photo_view.dart` (+114 -0) 📝 `mobile/lib/modules/asset_viewer/views/image_viewer_page.dart` (+9 -56) 📝 `mobile/pubspec.lock` (+1 -1) 📝 `mobile/pubspec.yaml` (+1 -1) </details> ### 📄 Description As discussed [here](https://github.com/alextran1502/immich/discussions/226) I'm working on some improvements for the image viewer page. photo_view 0.14 seems to resolve the issues of the previous versions for the newest flutter version. By using the `CachedNetworkImageProvider` directly, we have more control over the loading behavior. I decided to use the state-machine pattern for the thumbnail / full image loading process: ![state_machine](https://user-images.githubusercontent.com/6898797/174073800-8ab350ee-a9a2-431d-990a-e80f03539bb4.png) That way we can avoid nasty race-conditions. This PR contains a first (working) state. I will do the refactoring / testing next week. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 13:48:42 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#8520