## Description

## Tests
This commit is contained in:
Laurens Priem 2024-12-20 11:54:55 +01:00 committed by GitHub
commit 8c20f5f660
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 16 additions and 10 deletions

View File

@ -1515,7 +1515,7 @@ class MessageLookup extends MessageLookupByLibrary {
"searchDatesEmptySection": MessageLookupByLibrary.simpleMessage( "searchDatesEmptySection": MessageLookupByLibrary.simpleMessage(
"Search by a date, month or year"), "Search by a date, month or year"),
"searchDiscoverEmptySection": MessageLookupByLibrary.simpleMessage( "searchDiscoverEmptySection": MessageLookupByLibrary.simpleMessage(
"Images will be shown here once processing is complete"), "Images will be shown here once processing and syncing is complete"),
"searchFaceEmptySection": MessageLookupByLibrary.simpleMessage( "searchFaceEmptySection": MessageLookupByLibrary.simpleMessage(
"People will be shown here once indexing is done"), "People will be shown here once indexing is done"),
"searchFileTypesAndNamesEmptySection": "searchFileTypesAndNamesEmptySection":
@ -1534,7 +1534,7 @@ class MessageLookup extends MessageLookupByLibrary {
"searchPeopleEmptySection": MessageLookupByLibrary.simpleMessage( "searchPeopleEmptySection": MessageLookupByLibrary.simpleMessage(
"Invite people, and you\'ll see all photos shared by them here"), "Invite people, and you\'ll see all photos shared by them here"),
"searchPersonsEmptySection": MessageLookupByLibrary.simpleMessage( "searchPersonsEmptySection": MessageLookupByLibrary.simpleMessage(
"People will be shown here once processing is complete"), "People will be shown here once processing and syncing is complete"),
"searchResultCount": m62, "searchResultCount": m62,
"searchSectionsLengthMismatch": m63, "searchSectionsLengthMismatch": m63,
"security": MessageLookupByLibrary.simpleMessage("Security"), "security": MessageLookupByLibrary.simpleMessage("Security"),

View File

@ -10027,20 +10027,20 @@ class S {
); );
} }
/// `Images will be shown here once processing is complete` /// `Images will be shown here once processing and syncing is complete`
String get searchDiscoverEmptySection { String get searchDiscoverEmptySection {
return Intl.message( return Intl.message(
'Images will be shown here once processing is complete', 'Images will be shown here once processing and syncing is complete',
name: 'searchDiscoverEmptySection', name: 'searchDiscoverEmptySection',
desc: '', desc: '',
args: [], args: [],
); );
} }
/// `People will be shown here once processing is complete` /// `People will be shown here once processing and syncing is complete`
String get searchPersonsEmptySection { String get searchPersonsEmptySection {
return Intl.message( return Intl.message(
'People will be shown here once processing is complete', 'People will be shown here once processing and syncing is complete',
name: 'searchPersonsEmptySection', name: 'searchPersonsEmptySection',
desc: '', desc: '',
args: [], args: [],

View File

@ -1382,8 +1382,8 @@
"onlyThem": "Only them", "onlyThem": "Only them",
"checkingModels": "Checking models...", "checkingModels": "Checking models...",
"enableMachineLearningBanner": "Enable machine learning for magic search and face recognition", "enableMachineLearningBanner": "Enable machine learning for magic search and face recognition",
"searchDiscoverEmptySection": "Images will be shown here once processing is complete", "searchDiscoverEmptySection": "Images will be shown here once processing and syncing is complete",
"searchPersonsEmptySection": "People will be shown here once processing is complete", "searchPersonsEmptySection": "People will be shown here once processing and syncing is complete",
"viewersSuccessfullyAdded": "{count, plural, =0 {Added 0 viewer} =1 {Added 1 viewer} other {Added {count} viewers}}", "viewersSuccessfullyAdded": "{count, plural, =0 {Added 0 viewer} =1 {Added 1 viewer} other {Added {count} viewers}}",
"@viewersSuccessfullyAdded": { "@viewersSuccessfullyAdded": {
"placeholders": { "placeholders": {

View File

@ -545,7 +545,7 @@ class ClusterFeedbackService {
final smallestPersonClusterSize = personClusters final smallestPersonClusterSize = personClusters
.map((clusterID) => allClusterIdsToCountMap[clusterID] ?? 0) .map((clusterID) => allClusterIdsToCountMap[clusterID] ?? 0)
.reduce((value, element) => min(value, element)); .reduce((value, element) => min(value, element));
final checkSizes = [100, 20, kMinimumClusterSizeSearchResult, 10, 5, 1]; final checkSizes = [20, kMinimumClusterSizeSearchResult, 10, 5, 1];
Map<String, Vector> clusterAvgBigClusters = <String, Vector>{}; Map<String, Vector> clusterAvgBigClusters = <String, Vector>{};
final List<(String, double)> suggestionsMean = []; final List<(String, double)> suggestionsMean = [];
for (final minimumSize in checkSizes.toSet()) { for (final minimumSize in checkSizes.toSet()) {

View File

@ -92,6 +92,12 @@ class _PeoplePageState extends State<PeoplePage> {
log("loadPersonFiles"); log("loadPersonFiles");
final result = await SearchService.instance final result = await SearchService.instance
.getClusterFilesForPersonID(widget.person.remoteID); .getClusterFilesForPersonID(widget.person.remoteID);
if (result.isEmpty) {
_logger.severe(
"No files found for person with id ${widget.person.remoteID}, can't load files",
);
return [];
}
smallestClusterSize = result.values.fold<int>(result.values.first.length, smallestClusterSize = result.values.fold<int>(result.values.first.length,
(previousValue, element) { (previousValue, element) {
return element.length < previousValue ? element.length : previousValue; return element.length < previousValue ? element.length : previousValue;