diff --git a/lib/pangea/analytics_data/analytics_data_service.dart b/lib/pangea/analytics_data/analytics_data_service.dart index d8cae3cef..22d4ac1d6 100644 --- a/lib/pangea/analytics_data/analytics_data_service.dart +++ b/lib/pangea/analytics_data/analytics_data_service.dart @@ -220,6 +220,9 @@ class AnalyticsDataService { bool hasUsedConstruct(ConstructIdentifier id) => _mergeTable.constructUsed(id); + bool isConstructBlocked(ConstructIdentifier id) => + blockedConstructs.contains(id); + int uniqueConstructsByType(ConstructTypeEnum type) => _mergeTable.uniqueConstructsByType(type); diff --git a/lib/pangea/toolbar/reading_assistance/tokens_util.dart b/lib/pangea/toolbar/reading_assistance/tokens_util.dart index 0fe4be59a..abb99f46e 100644 --- a/lib/pangea/toolbar/reading_assistance/tokens_util.dart +++ b/lib/pangea/toolbar/reading_assistance/tokens_util.dart @@ -97,11 +97,13 @@ class TokensUtil { MatrixState.pangeaController.matrixState.analyticsDataService; for (final token in tokens) { - if (!token.lemma.saveVocab || !token.vocabConstructID.isContentWord) { + final cId = token.vocabConstructID; + if (!token.lemma.saveVocab || !cId.isContentWord) { continue; } - if (analyticsService.hasUsedConstruct(token.vocabConstructID)) { + if (analyticsService.hasUsedConstruct(cId) || + analyticsService.isConstructBlocked(cId)) { continue; }