Skip to content

armgit / ente

Public Imported from GitHub
0

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

Fix MediaQuery in initState issue (for large files view)

laurenspriem53cb217dbc1a
diff --git a/mobile/apps/photos/lib/ui/viewer/gallery/gallery.dart b/mobile/apps/photos/lib/ui/viewer/gallery/gallery.dart
index 904556f596..e1a9a1c188 100644
--- a/mobile/apps/photos/lib/ui/viewer/gallery/gallery.dart
+++ b/mobile/apps/photos/lib/ui/viewer/gallery/gallery.dart
@@ -261,7 +261,11 @@ class GalleryState extends State<Gallery> {
});
} else {
groupHeaderExtent = GalleryGroups.spacing;
- _updateGalleryGroups();
+ WidgetsBinding.instance.addPostFrameCallback((_) {
+ if (mounted) {
+ _updateGalleryGroups();
+ }
+ });
}
WidgetsBinding.instance.addPostFrameCallback((_) async {