Skip to content

armgit / ente

Public Imported from GitHub
0

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

Fix initial height flash in likes bottom sheet

ashilknf09d860c08d2
diff --git a/mobile/apps/photos/lib/ui/social/likes_bottom_sheet.dart b/mobile/apps/photos/lib/ui/social/likes_bottom_sheet.dart
index f588bdc899..d4a4f1c8e8 100644
--- a/mobile/apps/photos/lib/ui/social/likes_bottom_sheet.dart
+++ b/mobile/apps/photos/lib/ui/social/likes_bottom_sheet.dart
@@ -184,13 +184,15 @@ class _LikesBottomSheetState extends State<LikesBottomSheet> {
mainAxisSize: MainAxisSize.min,
children: [
_buildHeader(),
- Flexible(
- child: _isLoading
- ? const Center(child: CircularProgressIndicator())
- : _likes.isEmpty
- ? _buildEmptyState()
- : _buildLikesList(),
- ),
+ if (_isLoading)
+ const Padding(
+ padding: EdgeInsets.symmetric(vertical: 48),
+ child: CircularProgressIndicator(),
+ )
+ else if (_likes.isEmpty)
+ _buildEmptyState()
+ else
+ Flexible(child: _buildLikesList()),
],
),
),