use lemma instead of construct ID for comparison

This commit is contained in:
ggurdin 2025-11-11 14:24:39 -05:00
parent b120f3ef84
commit 92dfa52e47
No known key found for this signature in database
GPG key ID: A01CB41737CBB478

View file

@ -243,14 +243,14 @@ class GetAnalyticsController extends BaseController {
}
void _onUnlockMorphLemmas(Set<ConstructIdentifier> unlocked) {
final Set<ConstructIdentifier> excluded = {
ConstructIdentifier(
category: "NounType",
lemma: "Not_proper",
type: ConstructTypeEnum.morph,
),
const excludedLemmas = {'not_proper'};
final filtered = {
for (final id in unlocked)
if (!excludedLemmas.contains(id.lemma.toLowerCase())) id,
};
setState({'unlocked_constructs': unlocked.difference(excluded)});
setState({'unlocked_constructs': filtered});
}
/// A local cache of eventIds and construct uses for messages sent since the last update.