Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][photos] Fix null check used in null value error

ashilkn8c36fdb26415
diff --git a/mobile/lib/ui/viewer/gallery/component/gallery_file_widget.dart b/mobile/lib/ui/viewer/gallery/component/gallery_file_widget.dart
index 41e403b608..2b5925c554 100644
--- a/mobile/lib/ui/viewer/gallery/component/gallery_file_widget.dart
+++ b/mobile/lib/ui/viewer/gallery/component/gallery_file_widget.dart
@@ -38,8 +38,11 @@ class GalleryFileWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
final isFileSelected = selectedFiles?.isFileSelected(file) ?? false;
- final isPublicFile =
- CollectionsService.instance.isPublicCollection(file.collectionID!);
+ bool isPublicFile = false;
+ if (file.collectionID != null) {
+ isPublicFile =
+ CollectionsService.instance.isPublicCollection(file.collectionID!);
+ }
Color selectionColor = Colors.white;
if (isFileSelected && file.isUploaded && file.ownerID != currentUserID) {
final avatarColors = getEnteColorScheme(context).avatarColors;