Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][photos] Hide empty device albums section in search

AmanRajSinghMourya02c2f27c7f7a
diff --git a/mobile/apps/photos/lib/ui/collections/device/device_folders_vertical_grid_view.dart b/mobile/apps/photos/lib/ui/collections/device/device_folders_vertical_grid_view.dart
index c505f54225..49cabd1fb4 100644
--- a/mobile/apps/photos/lib/ui/collections/device/device_folders_vertical_grid_view.dart
+++ b/mobile/apps/photos/lib/ui/collections/device/device_folders_vertical_grid_view.dart
@@ -163,14 +163,19 @@ class _DeviceFolderVerticalGridViewBodyState
@override
Widget build(BuildContext context) {
if (backupPreferenceService.hasSkippedOnboardingPermission) {
- return SliverFillRemaining(
- hasScrollBody: false,
- child: OnDeviceEmptyState.permission(
- onFoldersSelected: () {
- _refreshDeviceCollections();
- },
- ),
- );
+ if (widget.emptyStateSliver != null) {
+ return widget.emptyStateSliver!;
+ }
+ return widget.showEmptyState
+ ? SliverFillRemaining(
+ hasScrollBody: false,
+ child: OnDeviceEmptyState.permission(
+ onFoldersSelected: () {
+ _refreshDeviceCollections();
+ },
+ ),
+ )
+ : const SliverToBoxAdapter(child: SizedBox.shrink());
}
return FutureBuilder<List<DeviceCollection>>(