fix(mobile): fix flutter cache eviction on thumbnails #27663
Merged
alextran1502 merged 6 commits intomainfrom Apr 10, 2026
Merged
fix(mobile): fix flutter cache eviction on thumbnails #27663alextran1502 merged 6 commits intomainfrom
alextran1502 merged 6 commits intomainfrom
Conversation
mertalev
reviewed
Apr 9, 2026
LeLunZ
commented
Apr 9, 2026
mertalev
reviewed
Apr 9, 2026
Co-authored-by: Mert <101130780+mertalev@users.noreply.github.com>
Collaborator
Author
|
bad rebase |
2411c65 to
8c6a1b6
Compare
Collaborator
Author
|
actually @mertalev in the iOS code we have this: So we also return null incase the request errors with NSURLErrorCancelled, but I don't really know if that only happens if |
Collaborator
Author
|
Actually returning a cancellation incase the error code is |
Member
|
There is no case where the request is cancelled but we didn't request it. It's a slightly redundant check. |
Collaborator
Author
|
Yeah I guess then this is finished? |
LeLunZ
commented
Apr 9, 2026
LeLunZ
commented
Apr 10, 2026
4 tasks
alextran1502
approved these changes
Apr 10, 2026
mertalev
approved these changes
Apr 10, 2026
eleboucher
pushed a commit
to eleboucher/homelab
that referenced
this pull request
Apr 10, 2026
…4) (#139) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [immich-app/immich](https://github.com/immich-app/immich) | patch | `v2.7.3` → `v2.7.4` | --- ### Release Notes <details> <summary>immich-app/immich (immich-app/immich)</summary> ### [`v2.7.4`](https://github.com/immich-app/immich/releases/tag/v2.7.4) [Compare Source](immich-app/immich@v2.7.3...v2.7.4) ### v2.7.4 This release addresses some issues with image rendering on the mobile app #### What's Changed ##### 🐛 Bug fixes - refactor(mobile): cleanup iOS image loading pipeline by [@​LeLunZ](https://github.com/LeLunZ) in [#​27672](immich-app/immich#27672) - fix(server): hide original filename when not showing metadata by [@​meesfrensel](https://github.com/meesfrensel) in [#​27581](immich-app/immich#27581) - fix(mobile): fix Flutter cache eviction on thumbnails by [@​LeLunZ](https://github.com/LeLunZ) in [#​27663](immich-app/immich#27663) - chore: pump cronet version by [@​shenlong-tanwen](https://github.com/shenlong-tanwen) in [#​27685](immich-app/immich#27685) **Full Changelog**: <immich-app/immich@v2.7.3...v2.7.4> </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMDEuMSIsInVwZGF0ZWRJblZlciI6IjQzLjEwMS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9naXRodWItcmVsZWFzZSIsInR5cGUvcGF0Y2giXX0=--> Reviewed-on: https://git.erwanleboucher.dev/eleboucher/homelab/pulls/139 Co-authored-by: bot-owl <bot@erwanleboucher.dev> Co-committed-by: bot-owl <bot@erwanleboucher.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In #27624 we fixed that requests get evicted from cache too late. When creating the PR I was too invested in checking that we don't do double evictions anywhere anymore and forgot that the FullImageProvider isn't actually everything and especially not what we use for thumbnails. The flag is missing from thumbhash providers and "normal" ImageProviders (which we use for thumbnails).
That currently results in the cache always being evicted for these images, after the corresponding widget is disposed, even if they are fully loaded.
Setting isFinished manually everywhere we need, is kind of a hassle and easily forgotten. (as noticed through this PR)
Thats why I made it part of the loadRequest methods, so it's part of the whole CancellableImageProviderMixin contract. And you actually have to opt out of setting the flag, which the "special" providers then have to do (eg. FullImageProvider).
Which means ThumbhashProvider and "normal" image provider don't have to set the flag.
@mertalev Sorry for the inconvenience.
Fixes #27679
How Has This Been Tested?
Checklist:
Please describe to which degree, if any, an LLM was used in creating this pull request.
/