mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix(mobile): thumbnail requests not being cancelled (#21331)
* fix requests not being cancelled * handle thumbhash
This commit is contained in:
parent
ae104ad7cc
commit
dc6ac3aaec
5 changed files with 27 additions and 23 deletions
|
|
@ -50,12 +50,11 @@ mixin CancellableImageProviderMixin<T extends Object> on CancellableImageProvide
|
|||
|
||||
Stream<ImageInfo> loadRequest(ImageRequest request, ImageDecoderCallback decode) async* {
|
||||
if (isCancelled) {
|
||||
this.request = null;
|
||||
evict();
|
||||
return;
|
||||
}
|
||||
|
||||
this.request = request;
|
||||
|
||||
try {
|
||||
final image = await request.load(decode);
|
||||
if (image == null || isCancelled) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue