corrected collection sorting
This commit is contained in:
parent
c0c8684125
commit
92c33e9acc
|
@ -153,7 +153,7 @@ export const syncCollections = async (token: string, key: string) => {
|
||||||
updationTime = Math.max(updationTime, collection.updationTime);
|
updationTime = Math.max(updationTime, collection.updationTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
collections.sort((a, b) => a.updationTime - b.updationTime);
|
collections.sort((a, b) => b.updationTime - a.updationTime);
|
||||||
await localForage.setItem(COLLECTION_UPDATION_TIME, updationTime);
|
await localForage.setItem(COLLECTION_UPDATION_TIME, updationTime);
|
||||||
await localForage.setItem(COLLECTIONS, collections);
|
await localForage.setItem(COLLECTIONS, collections);
|
||||||
return collections;
|
return collections;
|
||||||
|
|
Loading…
Reference in a new issue