-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
feat(mobile): Remote thumbnails and images use an on-disk image cache #7929
Conversation
format format Fix typo in equals remove unused import renames image loader
Deploying immich with
|
Latest commit: |
96b7984
|
Status: | ✅ Deploy successful! |
Preview URL: | https://83f0a77e.immich.pages.dev |
Branch Preview URL: | https://feat-on-disk-image-cache.immich.pages.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! This should improve the app experience substantially
mobile/lib/modules/asset_viewer/image_providers/cache/image_loader.dart
Outdated
Show resolved
Hide resolved
} | ||
} | ||
|
||
throw Exception('No file found in cache'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope we never reach this exception. If we do, it's a bit misleading. This exception can also occur if the download failed I believe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this is one of those "this code will never execute" scenarios
😂
I largely copied the code from the CachedNetworkImage
folks because their implementation worked so dang well, but they use a Stream and I only need a Future, so I needed to return something... What do you think we should do here? I could try to rework this into something more legible...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just "could not load image ID"
mobile/lib/modules/asset_viewer/image_providers/cache/thumbnail_image_cache_manager.dart
Outdated
Show resolved
Hide resolved
mobile/lib/modules/asset_viewer/image_providers/cache/remote_image_cache_manager.dart
Show resolved
Hide resolved
Amazing work! Thank you |
ImmichRemoteImageProvider
usingthumbnail: true
withImmichRemoteThumbnailProvider
ImageCacheManager.getImageFile
which uses an on device cache