Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Commit

Permalink
change people to contacts (#1512)
Browse files Browse the repository at this point in the history
  • Loading branch information
vishnukvmd authored Nov 17, 2023
2 parents 389d4e1 + b814fb0 commit 5dcf1ca
Show file tree
Hide file tree
Showing 16 changed files with 51 additions and 39 deletions.
20 changes: 10 additions & 10 deletions lib/generated/l10n.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion lib/l10n/intl_cs.arb
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"fileTypes": "File types",
"deleteConfirmDialogBody": "This account is linked to other ente apps, if you use any.\\n\\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted.",
"yourMap": "Your map",
"modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for"
"modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for",
"contacts": "Contacts"
}
3 changes: 2 additions & 1 deletion lib/l10n/intl_de.arb
Original file line number Diff line number Diff line change
Expand Up @@ -1105,5 +1105,6 @@
"fileTypes": "File types",
"deleteConfirmDialogBody": "This account is linked to other ente apps, if you use any.\\n\\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted.",
"yourMap": "Your map",
"modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for"
"modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for",
"contacts": "Contacts"
}
6 changes: 3 additions & 3 deletions lib/l10n/intl_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,6 @@
"photoDescriptions": "Photo descriptions",
"fileTypesAndNames": "File types and names",
"location": "Location",
"people": "People",
"moments": "Moments",
"searchFaceEmptySection": "Find all photos of a person",
"searchDatesEmptySection": "Search by a date, month or year",
Expand Down Expand Up @@ -1149,5 +1148,6 @@
"addNew": "Add new",
"@addNew": {
"description": "Text to add a new item (location tag, album, caption etc)"
}
}
},
"contacts": "Contacts"
}
3 changes: 2 additions & 1 deletion lib/l10n/intl_es.arb
Original file line number Diff line number Diff line change
Expand Up @@ -967,5 +967,6 @@
"fileTypes": "File types",
"deleteConfirmDialogBody": "This account is linked to other ente apps, if you use any.\\n\\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted.",
"yourMap": "Your map",
"modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for"
"modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for",
"contacts": "Contacts"
}
3 changes: 2 additions & 1 deletion lib/l10n/intl_fr.arb
Original file line number Diff line number Diff line change
Expand Up @@ -1105,5 +1105,6 @@
"fileTypes": "File types",
"deleteConfirmDialogBody": "This account is linked to other ente apps, if you use any.\\n\\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted.",
"yourMap": "Your map",
"modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for"
"modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for",
"contacts": "Contacts"
}
3 changes: 2 additions & 1 deletion lib/l10n/intl_it.arb
Original file line number Diff line number Diff line change
Expand Up @@ -1110,5 +1110,6 @@
"addOns": "Componenti aggiuntivi",
"addOnPageSubtitle": "Dettagli dei componenti aggiuntivi",
"yourMap": "Your map",
"modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for"
"modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for",
"contacts": "Contacts"
}
3 changes: 2 additions & 1 deletion lib/l10n/intl_ko.arb
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"fileTypes": "File types",
"deleteConfirmDialogBody": "This account is linked to other ente apps, if you use any.\\n\\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted.",
"yourMap": "Your map",
"modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for"
"modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for",
"contacts": "Contacts"
}
3 changes: 2 additions & 1 deletion lib/l10n/intl_nl.arb
Original file line number Diff line number Diff line change
Expand Up @@ -1105,5 +1105,6 @@
"fileTypes": "File types",
"deleteConfirmDialogBody": "Dit account is gekoppeld aan andere ente apps, als je er gebruik van maakt.\\n\\nJe geüploade gegevens worden in alle ente apps gepland voor verwijdering, en je account wordt permanent verwijderd voor alle ente diensten.",
"yourMap": "Your map",
"modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for"
"modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for",
"contacts": "Contacts"
}
3 changes: 2 additions & 1 deletion lib/l10n/intl_no.arb
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@
"fileTypes": "File types",
"deleteConfirmDialogBody": "This account is linked to other ente apps, if you use any.\\n\\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted.",
"yourMap": "Your map",
"modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for"
"modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for",
"contacts": "Contacts"
}
3 changes: 2 additions & 1 deletion lib/l10n/intl_pl.arb
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,6 @@
"fileTypes": "File types",
"deleteConfirmDialogBody": "This account is linked to other ente apps, if you use any.\\n\\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted.",
"yourMap": "Your map",
"modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for"
"modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for",
"contacts": "Contacts"
}
3 changes: 2 additions & 1 deletion lib/l10n/intl_pt.arb
Original file line number Diff line number Diff line change
Expand Up @@ -271,5 +271,6 @@
"fileTypes": "File types",
"deleteConfirmDialogBody": "This account is linked to other ente apps, if you use any.\\n\\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted.",
"yourMap": "Your map",
"modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for"
"modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for",
"contacts": "Contacts"
}
3 changes: 2 additions & 1 deletion lib/l10n/intl_zh.arb
Original file line number Diff line number Diff line change
Expand Up @@ -1110,5 +1110,6 @@
"addOns": "附加组件",
"addOnPageSubtitle": "附加组件详情",
"yourMap": "Your map",
"modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for"
"modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for",
"contacts": "Contacts"
}
22 changes: 11 additions & 11 deletions lib/models/search/search_types.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ enum SectionType {
// includes year, month , day, event ResultType
moment,
// People section shows the files shared by other persons
people,
contacts,
fileCaption,
album,
fileTypesAndExtension,
Expand All @@ -57,8 +57,8 @@ extension SectionTypeExtensions on SectionType {
return S.of(context).moments;
case SectionType.location:
return S.of(context).location;
case SectionType.people:
return S.of(context).people;
case SectionType.contacts:
return S.of(context).contacts;
case SectionType.album:
return S.of(context).albums;
case SectionType.fileTypesAndExtension:
Expand All @@ -78,7 +78,7 @@ extension SectionTypeExtensions on SectionType {
return S.of(context).searchDatesEmptySection;
case SectionType.location:
return S.of(context).searchLocationEmptySection;
case SectionType.people:
case SectionType.contacts:
return S.of(context).searchPeopleEmptySection;
case SectionType.album:
return S.of(context).searchAlbumsEmptySection;
Expand All @@ -101,7 +101,7 @@ extension SectionTypeExtensions on SectionType {
return false;
case SectionType.location:
return true;
case SectionType.people:
case SectionType.contacts:
return true;
case SectionType.album:
return true;
Expand All @@ -122,7 +122,7 @@ extension SectionTypeExtensions on SectionType {
return false;
case SectionType.location:
return true;
case SectionType.people:
case SectionType.contacts:
return true;
case SectionType.album:
return true;
Expand All @@ -145,7 +145,7 @@ extension SectionTypeExtensions on SectionType {
return S.of(context).addNew;
case SectionType.location:
return S.of(context).addNew;
case SectionType.people:
case SectionType.contacts:
return S.of(context).invite;
case SectionType.album:
return S.of(context).addNew;
Expand All @@ -166,7 +166,7 @@ extension SectionTypeExtensions on SectionType {
return null;
case SectionType.location:
return Icons.add_location_alt_outlined;
case SectionType.people:
case SectionType.contacts:
return Icons.adaptive.share;
case SectionType.album:
return Icons.add;
Expand All @@ -179,7 +179,7 @@ extension SectionTypeExtensions on SectionType {

FutureVoidCallback ctaOnTap(BuildContext context) {
switch (this) {
case SectionType.people:
case SectionType.contacts:
return () async {
shareText(
S.of(context).shareTextRecommendUsingEnte,
Expand Down Expand Up @@ -249,8 +249,8 @@ extension SectionTypeExtensions on SectionType {
case SectionType.location:
return SearchService.instance.getAllLocationTags(limit);

case SectionType.people:
return SearchService.instance.getAllPeopleSearchResults(limit);
case SectionType.contacts:
return SearchService.instance.getAllContactsSearchResults(limit);

case SectionType.album:
return SearchService.instance.getAllCollectionSearchResults(limit);
Expand Down
4 changes: 2 additions & 2 deletions lib/services/search_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ class SearchService {
);
}

Future<List<GenericSearchResult>> getPeopleSearchResults(
Future<List<GenericSearchResult>> getContactSearchResults(
String query,
) async {
final lowerCaseQuery = query.toLowerCase();
Expand Down Expand Up @@ -846,7 +846,7 @@ class SearchService {
return searchResults;
}

Future<List<GenericSearchResult>> getAllPeopleSearchResults(
Future<List<GenericSearchResult>> getAllContactsSearchResults(
int? limit,
) async {
try {
Expand Down
5 changes: 3 additions & 2 deletions lib/ui/viewer/search/search_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,9 @@ class SearchWidgetState extends State<SearchWidget> {
await _searchService.getDateResults(context, query);
allResults.addAll(possibleEvents);

final peopleResults = await _searchService.getPeopleSearchResults(query);
allResults.addAll(peopleResults);
final contactResults =
await _searchService.getContactSearchResults(query);
allResults.addAll(contactResults);
} catch (e, s) {
_logger.severe("error during search", e, s);
}
Expand Down

0 comments on commit 5dcf1ca

Please sign in to comment.