Skip to content

armgit / ente

Public Imported from GitHub
0

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

Don't block on cities fetch during remoteSync

Manav Rathi12de02f1b5a8
diff --git a/web/packages/new/photos/services/search/worker.ts b/web/packages/new/photos/services/search/worker.ts
index 999da888df..2d9f0149a8 100644
--- a/web/packages/new/photos/services/search/worker.ts
+++ b/web/packages/new/photos/services/search/worker.ts
@@ -46,12 +46,11 @@ export class SearchWorker {
* session storage so this key needs to be passed to us explicitly.
*/
async sync(masterKey: Uint8Array) {
- return Promise.all([
- pullUserEntities("location", masterKey)
- .then(() => savedLocationTags())
- .then((ts) => (this.locationTags = ts)),
- fetchCities().then((cs) => (this.cities = cs)),
- ]);
+ // Let the cities fetch complete async.
+ void fetchCities().then((cs) => (this.cities = cs));
+ return pullUserEntities("location", masterKey)
+ .then(() => savedLocationTags())
+ .then((ts) => (this.locationTags = ts));
}
/**