Kaynağa Gözat

Fix cannot query shared album on mobile (#298)

Alex 3 yıl önce
ebeveyn
işleme
7586c65103

+ 4 - 1
mobile/lib/modules/sharing/models/shared_album.model.dart

@@ -72,7 +72,10 @@ class SharedAlbum {
       albumThumbnailAssetId: map['albumThumbnailAssetId'],
       albumThumbnailAssetId: map['albumThumbnailAssetId'],
       sharedUsers:
       sharedUsers:
           List<User>.from(map['sharedUsers']?.map((x) => User.fromMap(x))),
           List<User>.from(map['sharedUsers']?.map((x) => User.fromMap(x))),
-      assets: map['assets']?.map((x) => ImmichAsset.fromMap(x)).toList(),
+      assets: map['assets'] != null
+          ? List<ImmichAsset>.from(
+              map['assets']?.map((x) => ImmichAsset.fromMap(x)))
+          : null,
     );
     );
   }
   }