Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Tweak

Manav Rathifbd0bf257e0f
diff --git a/web/packages/new/photos/services/collection.ts b/web/packages/new/photos/services/collection.ts
index b185f0d671..9028225e30 100644
--- a/web/packages/new/photos/services/collection.ts
+++ b/web/packages/new/photos/services/collection.ts
@@ -214,7 +214,7 @@ export interface CollectionChange {
* will be at most one entry for a given collection in the result array. See:
* [Note: Diff response will have at most one entry for an id]
*/
-export const getCollectionChanges = async (
+export const getCollections = async (
sinceTime: number,
): Promise<CollectionChange[]> => {
const res = await fetch(
diff --git a/web/packages/new/photos/services/collections.ts b/web/packages/new/photos/services/collections.ts
index a0cad8303d..7df89dc8d7 100644
--- a/web/packages/new/photos/services/collections.ts
+++ b/web/packages/new/photos/services/collections.ts
@@ -1,6 +1,6 @@
import { type Collection } from "ente-media/collection";
import localForage from "ente-shared/storage/localForage";
-import { getCollectionChanges, isHiddenCollection } from "./collection";
+import { getCollections, isHiddenCollection } from "./collection";
import { savedCollections } from "./photos-fdb";
const COLLECTION_TABLE = "collections";
@@ -43,15 +43,10 @@ export const getLatestCollections = async (
};
export const getAllLatestCollections = async (): Promise<Collection[]> => {
- const collections = await syncCollections();
- return collections;
-};
-
-export const syncCollections = async () => {
const localCollections = await savedCollections();
let sinceTime = await getCollectionUpdationTime();
- const changes = await getCollectionChanges(sinceTime);
+ const changes = await getCollections(sinceTime);
if (!changes.length) return localCollections;
const hiddenCollectionIDs = await getHiddenCollectionIDs();