Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(mobile): blurry memory photos #6734

Merged
merged 2 commits into from
Jan 30, 2024
Merged

Conversation

alextran1502
Copy link
Contributor

@alextran1502 alextran1502 commented Jan 29, 2024

Fixes #6423

Copy link

cloudflare-pages bot commented Jan 29, 2024

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: c3a650d
Status: ✅  Deploy successful!
Preview URL: https://62bf68fc.immich.pages.dev
Branch Preview URL: https://mobile-fix-blurry-memory.immich.pages.dev

View logs

Copy link
Contributor

@martyfuhry martyfuhry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm testing this now on my wife's phone!

@@ -49,7 +49,7 @@ class ImmichImage extends StatelessWidget {
final Asset asset = this.asset!;
if (useLocal(asset)) {
return Image(
image: localThumbnailProvider(asset),
image: localThumbnailProvider(asset, dimension: 2048),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably fix it. I think I'll make it a point to create a new localImageProvider which doesn't need a dimension, and just uses the full asset. Because using the thumbnail provider to show the full image feels a bit dirty.

@martyfuhry
Copy link
Contributor

I can confirm that this fixes the issue! Great work, Alex!

I can refactor this later to use a non-thumbnail image provider, or else you can do it in this PR. Just copy / paste the thumbnail image provider and use it in place. Don't specify a thumbnailSize and it'll use the full image, I think?

In any case, I'll approve this, so merge it or add my suggestion as you like!

@martyfuhry
Copy link
Contributor

Huh, weird. I can't approve the PR.

@alextran1502
Copy link
Contributor Author

@martyfuhry @shenlong-tanwen, My previous attempt caused a performance drop while browsing the timeline since it gets a large thumbnail size. So I refactored it to use the previous size 250px by default unless we pass in the preferredLocalAssetSize to modify that

@alextran1502 alextran1502 merged commit 9e1d358 into main Jan 30, 2024
24 checks passed
@alextran1502 alextran1502 deleted the mobile/fix-blurry-memory branch January 30, 2024 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Android app memories are showing in low resolution
3 participants