Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Fix flickering of GalleryFileWidget on hero animation after closing it's open full view

ashilknf139e0a09825
diff --git a/mobile/apps/photos/lib/ui/viewer/file/thumbnail_widget.dart b/mobile/apps/photos/lib/ui/viewer/file/thumbnail_widget.dart
index 6ab50e3019..cbc707d6d4 100644
--- a/mobile/apps/photos/lib/ui/viewer/file/thumbnail_widget.dart
+++ b/mobile/apps/photos/lib/ui/viewer/file/thumbnail_widget.dart
@@ -432,14 +432,14 @@ class _ThumbnailWidgetState extends State<ThumbnailWidget> {
}
void _cacheAndRender(ImageProvider<Object> imageProvider) {
- precacheImage(imageProvider, context).then((value) {
- if (mounted) {
- setState(() {
- _imageProvider = imageProvider;
- _hasLoadedThumbnail = true;
- });
- }
- });
+ if (mounted) {
+ setState(() {
+ _imageProvider = imageProvider;
+ _hasLoadedThumbnail = true;
+ });
+ }
+
+ precacheImage(imageProvider, context);
}
void _reset() {