π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Prune
Manav Rathi1bef528fdec7
diff --git a/web/apps/photos/src/pages/gallery/index.tsx b/web/apps/photos/src/pages/gallery/index.tsxindex 0aa578a5c7..c5e72e5587 100644--- a/web/apps/photos/src/pages/gallery/index.tsx+++ b/web/apps/photos/src/pages/gallery/index.tsx@@ -99,7 +99,6 @@ import {getSectionSummaries,} from "services/collectionService";import { syncFiles } from "services/fileService";-import locationSearchService from "services/locationSearchService";import { sync, triggerPreFileInfoSync } from "services/sync";import { syncTrash } from "services/trashService";import uploadManager from "services/upload/uploadManager";diff --git a/web/apps/photos/src/services/locationSearchService.ts b/web/apps/photos/src/services/locationSearchService.tsdeleted file mode 100644index 66454965e3..0000000000--- a/web/apps/photos/src/services/locationSearchService.ts+++ /dev/null@@ -1,45 +0,0 @@-import log from "@/base/log";-import type { City } from "@/new/photos/services/search/types";--class LocationSearchService {- private cities: Array<City> = [];- private citiesPromise: Promise<void>;-- async loadCities() {- try {- if (this.citiesPromise) {- return;- }- this.citiesPromise = fetch(- "https://static.ente.io/world_cities.json",- ).then((response) => {- return response.json().then((data) => {- this.cities = data["data"];- });- });- await this.citiesPromise;- } catch (e) {- log.error("LocationSearchService loadCities failed", e);- this.citiesPromise = null;- }- }-- async searchCities(searchTerm: string) {- try {- if (!this.citiesPromise) {- this.loadCities();- }- await this.citiesPromise;- return this.cities.filter((city) => {- return city.name- .toLowerCase()- .startsWith(searchTerm.toLowerCase());- });- } catch (e) {- log.error("LocationSearchService searchCities failed", e);- throw e;- }- }-}--export default new LocationSearchService();diff --git a/web/apps/photos/src/services/searchService.ts b/web/apps/photos/src/services/searchService.tsindex 259dc18e48..08e37ca619 100644--- a/web/apps/photos/src/services/searchService.ts+++ b/web/apps/photos/src/services/searchService.ts@@ -28,7 +28,6 @@ import { Collection } from "types/collection";import { EntityType, LocationTag } from "types/entity";import { getUniqueFiles } from "utils/file";import { getLatestEntities } from "./entityService";-import locationSearchService from "./locationSearchService";// Suggestions shown in the search dropdown's empty state, i.e. when the user// selects the search bar but does not provide any input.@@ -216,8 +215,9 @@ async function getLocationSuggestions(searchPhrase: string) {locationTagSuggestions.map((result) => result.label),);- const citySearchResults =- await locationSearchService.searchCities(searchPhrase);+ const citySearchResults: City[] = [];+ // TODO-cgroup+ // await locationSearchService.searchCities(searchPhrase);const nonConflictingCityResult = citySearchResults.filter((city) => !locationTagNames.has(city.name),