reduce requested file count to 1 in getCollectionLatestFile
This commit is contained in:
parent
6321874ead
commit
bc709d5961
1 changed files with 3 additions and 2 deletions
|
@ -115,9 +115,10 @@ export const getCollectionLatestFile = async (
|
|||
return Promise.all(
|
||||
collections.map(async collection => {
|
||||
const sinceTime: string = (Number(await localForage.getItem<string>(`${collection.id}-time`)) - 1).toString();
|
||||
const file: file[] = await getFiles([collection], sinceTime, "100", token);
|
||||
const files: file[] = await getFiles([collection], sinceTime, "1", token) || [];
|
||||
|
||||
return {
|
||||
file: file[0],
|
||||
file: files[0],
|
||||
collection,
|
||||
}
|
||||
}))
|
||||
|
|
Loading…
Add table
Reference in a new issue