Skip to content

fix(mobile): improve image load cancellation handling#27624

Merged
mertalev merged 1 commit intomainfrom
bugfix/image-load-cancellation
Apr 8, 2026
Merged

fix(mobile): improve image load cancellation handling#27624
mertalev merged 1 commit intomainfrom
bugfix/image-load-cancellation

Conversation

@LeLunZ
Copy link
Copy Markdown
Collaborator

@LeLunZ LeLunZ commented Apr 8, 2026

Description

Instantly evicts images from cache when we don't need them anymore.
This also means, we can't call evict again when we exit early with isCancelled is true, as that could remove already new cache values.
So I hope I didn't miss an exit condition where we can't call evict(true).

How Has This Been Tested?

  • Simulator

Checklist:

Please describe to which degree, if any, an LLM was used in creating this pull request.

/

@LeLunZ LeLunZ requested a review from mertalev April 8, 2026 15:43
@LeLunZ LeLunZ requested a review from shenlong-tanwen as a code owner April 8, 2026 15:43
@LeLunZ LeLunZ changed the title fix(image): improve image load cancellation handling fix(mobile): improve image load cancellation handling Apr 8, 2026
Comment thread mobile/lib/presentation/widgets/images/image_provider.dart
@mertalev
Copy link
Copy Markdown
Member

mertalev commented Apr 8, 2026

I'm not sure if this fixes the thumbnail loading issue we've seen, but it addresses a race condition regardless. Interestingly, it seems to perform better than main, which is a good sign that the cancellation is behaving better with this change.

horizon_with_coverage2

@mertalev mertalev merged commit 2b0f6c9 into main Apr 8, 2026
74 checks passed
@mertalev mertalev deleted the bugfix/image-load-cancellation branch April 8, 2026 21:23
eleboucher pushed a commit to eleboucher/homelab that referenced this pull request Apr 10, 2026
…3) (#128)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [immich-app/immich](https://github.com/immich-app/immich) | patch | `v2.7.2` → `v2.7.3` |

---

### Release Notes

<details>
<summary>immich-app/immich (immich-app/immich)</summary>

### [`v2.7.3`](https://github.com/immich-app/immich/releases/tag/v2.7.3)

[Compare Source](immich-app/immich@v2.7.2...v2.7.3)

### v2.7.3

#### What's Changed

##### 🐛 Bug fixes

- fix(server): avoid false restore failures on large database imports by [@&#8203;ErasmusAndre](https://github.com/ErasmusAndre) in [#&#8203;27420](immich-app/immich#27420)
- fix(mobile): improve image load cancellation handling by [@&#8203;LeLunZ](https://github.com/LeLunZ) in [#&#8203;27624](immich-app/immich#27624)
- fix(server): people search not showing for 3 or less characters by [@&#8203;zackpollard](https://github.com/zackpollard) in [#&#8203;27629](immich-app/immich#27629)
- fix(web): don't cache empty search results for people search by [@&#8203;zackpollard](https://github.com/zackpollard) in [#&#8203;27632](immich-app/immich#27632)
- fix(mobile): get provider refs before async gaps in backup page by [@&#8203;LeLunZ](https://github.com/LeLunZ) in [#&#8203;27597](immich-app/immich#27597)
- fix: ssr open graph tags by [@&#8203;jrasm91](https://github.com/jrasm91) in [#&#8203;27639](immich-app/immich#27639)

##### 📚 Documentation

- fix(docs): updated docker deprecation link  by [@&#8203;mmomjian](https://github.com/mmomjian) in [#&#8203;27633](immich-app/immich#27633)

#### New Contributors

- [@&#8203;fluffy](https://github.com/fluffy) made their first contribution in [#&#8203;27606](immich-app/immich#27606)
- [@&#8203;ErasmusAndre](https://github.com/ErasmusAndre) made their first contribution in [#&#8203;27420](immich-app/immich#27420)

**Full Changelog**: <immich-app/immich@v2.7.2...v2.7.3>

</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/128
Co-authored-by: bot-owl <bot@erwanleboucher.dev>
Co-committed-by: bot-owl <bot@erwanleboucher.dev>
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.

2 participants