added logic to skip favorite collections and add empty collections to upload collection selector
This commit is contained in:
parent
85f17f0108
commit
6bb32f5c24
|
@ -174,10 +174,18 @@ export const getCollectionAndItsLatestFile = (
|
|||
}
|
||||
});
|
||||
let allCollectionAndItsLatestFile: CollectionAndItsLatestFile[] = [];
|
||||
for (const [collectionID, file] of latestFile) {
|
||||
const userID = getData(LS_KEYS.USER).id;
|
||||
|
||||
for (const [_, collection] of collectionMap) {
|
||||
if (
|
||||
collection.owner.id != userID ||
|
||||
collection.type == CollectionType.favorites
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
allCollectionAndItsLatestFile.push({
|
||||
collection: collectionMap.get(collectionID),
|
||||
file,
|
||||
collection,
|
||||
file: latestFile.get(collection.id),
|
||||
});
|
||||
}
|
||||
return allCollectionAndItsLatestFile;
|
||||
|
|
Loading…
Reference in a new issue