Skip to content

High performance self-hosted photo and video management solution.

fix: evict image from cache on error during image loading (#26078)

Luis Nachtigall3462fc434eb4
diff --git a/mobile/lib/presentation/widgets/images/image_provider.dart b/mobile/lib/presentation/widgets/images/image_provider.dart
index be5b8b4189..3c3ed460b4 100644
--- a/mobile/lib/presentation/widgets/images/image_provider.dart
+++ b/mobile/lib/presentation/widgets/images/image_provider.dart
@@ -62,6 +62,9 @@ mixin CancellableImageProviderMixin<T extends Object> on CancellableImageProvide
return;
}
yield image;
+ } catch (e) {
+ PaintingBinding.instance.imageCache.evict(this);
+ rethrow;
} finally {
this.request = null;
}