fix(mobile): thumbnail requests not being cancelled (#21331)

* fix requests not being cancelled

* handle thumbhash
This commit is contained in:
Mert
2025-08-27 17:40:45 -04:00
committed by GitHub
parent ae104ad7cc
commit dc6ac3aaec
5 changed files with 27 additions and 23 deletions

View File

@@ -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) {