Don't show collections for whom the files haven't been fetched yet
This commit is contained in:
parent
1677ed7334
commit
28c1069388
1 changed files with 5 additions and 2 deletions
|
@ -139,8 +139,11 @@ class _CollectionsGalleryWidgetState extends State<CollectionsGalleryWidget> {
|
|||
if (c.ownerID != Configuration.instance.getUserID()) {
|
||||
continue;
|
||||
}
|
||||
collectionsWithThumbnail.add(CollectionWithThumbnail(
|
||||
c, await FilesDB.instance.getLatestFileInCollection(c.id)));
|
||||
var thumbnail = await FilesDB.instance.getLatestFileInCollection(c.id);
|
||||
if (thumbnail == null) {
|
||||
continue;
|
||||
}
|
||||
collectionsWithThumbnail.add(CollectionWithThumbnail(c, thumbnail));
|
||||
}
|
||||
return CollectionItems(folders, collectionsWithThumbnail);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue