fix(mobile): caching thumbnails to disk (#21275)

This commit is contained in:
Mert 2025-08-26 11:49:12 -04:00 committed by GitHub
parent 19c53609e1
commit e67265cef2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 51 additions and 26 deletions

View file

@ -94,7 +94,7 @@ class _ThumbnailState extends State<Thumbnail> with SingleTickerProviderStateMix
imageInfo.dispose();
return;
}
_fadeController.value = 1.0;
setState(() {
_providerImage = imageInfo.image;
});
@ -115,7 +115,7 @@ class _ThumbnailState extends State<Thumbnail> with SingleTickerProviderStateMix
final imageStream = _imageStream = imageProvider.resolve(ImageConfiguration.empty);
final imageStreamListener = _imageStreamListener = ImageStreamListener(
(ImageInfo imageInfo, bool synchronousCall) {
_stopListeningToStream();
_stopListeningToThumbhashStream();
if (!mounted) {
imageInfo.dispose();
return;