Browse Source

added setting favItemIds state on intial load

Abhinav-grd 4 years ago
parent
commit
21f2a7a4df
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/pages/gallery/index.tsx

+ 3 - 0
src/pages/gallery/index.tsx

@@ -140,6 +140,9 @@ export default function Gallery(props) {
             setData(data);
             setData(data);
             setCollections(collections);
             setCollections(collections);
             setCollectionAndItsLatestFile(collectionAndItsLatestFile);
             setCollectionAndItsLatestFile(collectionAndItsLatestFile);
+            const favItemIds = await getFavItemIds(data);
+            setFavItemIds(favItemIds);
+
             setLoading(false);
             setLoading(false);
             setProgress(80);
             setProgress(80);
             await syncWithRemote();
             await syncWithRemote();