Skip to content

Commit 5c637da

Browse files
laurenspriemua741
authored andcommitted
[mob][photos] Bug fixes (#7426)
## Description - Fix issue where deleting everything from a discover category causes white screen. ## Tests Tested in debug mode on my pixel phone.
1 parent 6098573 commit 5c637da

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

mobile/apps/photos/lib/ui/viewer/gallery/device_folder_page.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ class DeviceFolderPage extends StatelessWidget {
5656
header: Configuration.instance.hasConfiguredAccount()
5757
? BackupHeaderWidget(deviceCollection)
5858
: const SizedBox.shrink(),
59-
initialFiles: [deviceCollection.thumbnail!],
59+
initialFiles: deviceCollection.thumbnail != null
60+
? [deviceCollection.thumbnail!]
61+
: const <EnteFile>[],
6062
);
6163
return GalleryFilesState(
6264
child: Scaffold(

mobile/apps/photos/lib/ui/viewer/search/result/magic_result_screen.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ class _MagicResultScreenState extends State<MagicResultScreen> {
165165
tagPrefix: widget.heroTag,
166166
selectedFiles: _selectedFiles,
167167
enableFileGrouping: _enableGrouping,
168-
initialFiles: [files.first],
168+
initialFiles: files.isNotEmpty ? [files.first] : const [],
169169
);
170170
return GalleryFilesState(
171171
child: InheritedSearchFilterDataWrapper(

0 commit comments

Comments
 (0)