From a44622924215711ddd30a6d660d357d603227c9e Mon Sep 17 00:00:00 2001 From: Kelrap <99418823+Kelrap@users.noreply.github.com> Date: Tue, 2 Sep 2025 09:24:41 -0400 Subject: [PATCH] Fix problem with unlockedLemmas that prevented grammar popups (#3832) * Fix problem with unlockedLemmas that prevented grammar popups * don't convert set into list --------- Co-authored-by: ggurdin Co-authored-by: ggurdin <46800240+ggurdin@users.noreply.github.com> --- lib/pangea/analytics_misc/construct_list_model.dart | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/pangea/analytics_misc/construct_list_model.dart b/lib/pangea/analytics_misc/construct_list_model.dart index 5d33e1c6f..7e4e63ed8 100644 --- a/lib/pangea/analytics_misc/construct_list_model.dart +++ b/lib/pangea/analytics_misc/construct_list_model.dart @@ -217,10 +217,9 @@ class ConstructListModel { }) { final constructs = constructList(type: type); final List unlocked = []; - final constructsList = []; - // type == ConstructTypeEnum.vocab ? _vocabLemmasList : _grammarLemmasList; + final constructsSet = constructList(type: type).map((e) => e.lemma).toSet(); - for (final lemma in constructsList) { + for (final lemma in constructsSet) { final matches = constructs.where((m) => m.lemma == lemma); final totalPoints = matches.fold( 0,