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 <ggurdin@gmail.com>
Co-authored-by: ggurdin <46800240+ggurdin@users.noreply.github.com>
This commit is contained in:
Kelrap 2025-09-02 09:24:41 -04:00 committed by GitHub
parent 58e6aa3298
commit a446229242
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -217,10 +217,9 @@ class ConstructListModel {
}) {
final constructs = constructList(type: type);
final List<ConstructIdentifier> 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<int>(
0,