Skip to content

armgit / ente

Public Imported from GitHub
0

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

Dedup

Manav Rathi039055ccc050
diff --git a/web/apps/photos/src/services/searchService.ts b/web/apps/photos/src/services/searchService.ts
index 38641ba9ed..ce59404ad6 100644
--- a/web/apps/photos/src/services/searchService.ts
+++ b/web/apps/photos/src/services/searchService.ts
@@ -47,7 +47,6 @@ export const getAutoCompleteSuggestions =
await getClipSuggestion(searchPhrase),
...getFileTypeSuggestion(searchPhrase),
...getHolidaySuggestion(searchPhrase),
- ...getYearSuggestion(searchPhrase),
...getDateSuggestion(searchPhrase),
...getCollectionSuggestion(searchPhrase, collections),
getFileNameSuggestion(searchPhrase, files),
@@ -138,26 +137,6 @@ function getHolidaySuggestion(searchPhrase: string): Suggestion[] {
);
}
-function getYearSuggestion(searchPhrase: string): Suggestion[] {
- if (searchPhrase.length === 4) {
- try {
- const year = parseInt(searchPhrase);
- if (year >= 1970 && year <= new Date().getFullYear()) {
- return [
- {
- label: searchPhrase,
- value: { year },
- type: SuggestionType.DATE,
- },
- ];
- }
- } catch (e) {
- log.error("getYearSuggestion failed", e);
- }
- }
- return [];
-}
-
export async function getAllPeopleSuggestion(): Promise<Array<Suggestion>> {
try {
const people = await getAllPeople(200);