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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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) {