change people to contacts (#1512)
This commit is contained in:
commit
5dcf1ca2a5
16 changed files with 51 additions and 39 deletions
20
lib/generated/l10n.dart
generated
20
lib/generated/l10n.dart
generated
|
@ -6829,16 +6829,6 @@ class S {
|
|||
);
|
||||
}
|
||||
|
||||
/// `People`
|
||||
String get people {
|
||||
return Intl.message(
|
||||
'People',
|
||||
name: 'people',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// `Moments`
|
||||
String get moments {
|
||||
return Intl.message(
|
||||
|
@ -8067,6 +8057,16 @@ class S {
|
|||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// `Contacts`
|
||||
String get contacts {
|
||||
return Intl.message(
|
||||
'Contacts',
|
||||
name: 'contacts',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class AppLocalizationDelegate extends LocalizationsDelegate<S> {
|
||||
|
|
|
@ -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"
|
||||
}
|
|
@ -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"
|
||||
}
|
|
@ -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",
|
||||
|
@ -1149,5 +1148,6 @@
|
|||
"addNew": "Add new",
|
||||
"@addNew": {
|
||||
"description": "Text to add a new item (location tag, album, caption etc)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"contacts": "Contacts"
|
||||
}
|
|
@ -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"
|
||||
}
|
|
@ -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"
|
||||
}
|
|
@ -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"
|
||||
}
|
|
@ -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"
|
||||
}
|
|
@ -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"
|
||||
}
|
|
@ -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"
|
||||
}
|
|
@ -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"
|
||||
}
|
|
@ -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"
|
||||
}
|
|
@ -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"
|
||||
}
|
|
@ -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,
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
|
|
|
@ -810,7 +810,7 @@ class SearchService {
|
|||
);
|
||||
}
|
||||
|
||||
Future<List<GenericSearchResult>> getPeopleSearchResults(
|
||||
Future<List<GenericSearchResult>> getContactSearchResults(
|
||||
String query,
|
||||
) async {
|
||||
final lowerCaseQuery = query.toLowerCase();
|
||||
|
@ -846,7 +846,7 @@ class SearchService {
|
|||
return searchResults;
|
||||
}
|
||||
|
||||
Future<List<GenericSearchResult>> getAllPeopleSearchResults(
|
||||
Future<List<GenericSearchResult>> getAllContactsSearchResults(
|
||||
int? limit,
|
||||
) async {
|
||||
try {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue