fix: show morph as unlocked in analytics if ever used (#5158)

This commit is contained in:
ggurdin 2026-01-09 11:47:37 -05:00 committed by GitHub
parent ab66ca35fe
commit 2aa0c42994
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -195,7 +195,7 @@ class MorphTagChip extends StatelessWidget {
Widget build(BuildContext context) {
final theme = Theme.of(context);
final unlocked =
constructAnalytics != null && constructAnalytics!.points > 0 ||
constructAnalytics != null && constructAnalytics!.numTotalUses > 0 ||
Matrix.of(context).client.userID == Environment.supportUserId;
return Material(

View file

@ -48,6 +48,8 @@ class ConstructUses {
bool get hasCorrectUse => _uses.any((use) => use.xp > 0);
bool get hasIncorrectUse => _uses.any((use) => use.xp < 0);
int get numTotalUses => _uses.length;
ConstructIdentifier get id => ConstructIdentifier(
lemma: lemma,
type: constructType,