fix: consider construct ID invalid if lemma is empty (#5813)

This commit is contained in:
ggurdin 2026-02-25 13:18:14 -05:00 committed by GitHub
parent 473ffbaf24
commit d983f26dd5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View file

@ -352,8 +352,7 @@ class AnalyticsDataService {
final existing = cleaned[canonical];
if (existing != null) {
existing.merge(entry);
} else if (!blocked.contains(canonical) &&
canonical.category != 'other') {
} else if (!blocked.contains(canonical) && !canonical.isInvalid) {
cleaned[canonical] = entry;
}
}

View file

@ -33,7 +33,7 @@ class VocabAnalyticsListView extends StatelessWidget {
controller.vocab?.where(_vocabFilter).sorted(_sortBySearch).toList();
bool _vocabFilter(ConstructUses use) =>
use.lemma.isNotEmpty && _levelFilter(use) && _searchFilter(use);
_levelFilter(use) && _searchFilter(use);
bool _levelFilter(ConstructUses use) {
if (controller.selectedConstructLevel == null) {

View file

@ -194,5 +194,6 @@ class ConstructIdentifier {
(type == ConstructTypeEnum.morph &&
MorphFeaturesEnumExtension.fromString(category) ==
MorphFeaturesEnum.Unknown) ||
category == 'other';
category == 'other' ||
lemma.isEmpty;
}