correted fav second place pinning

This commit is contained in:
Abhinav-grd 2021-03-24 16:31:57 +05:30
parent 2eaa1bc3b8
commit 2fa1f2b484

View file

@ -158,11 +158,7 @@ export const syncCollections = async () => {
}
}
collections.sort((a, b) => b.updationTime - a.updationTime);
collections.sort((a, b) =>
a.type === CollectionType.favorites
? Number.MIN_SAFE_INTEGER
: Number.MAX_SAFE_INTEGER
);
collections.sort((a, b) => (b.type === CollectionType.favorites ? 1 : 0));
await localForage.setItem(COLLECTION_UPDATION_TIME, updationTime);
await localForage.setItem(COLLECTIONS, collections);
return collections;