fix: don't mark blocked constructs as unused (#5844)
This commit is contained in:
parent
ae96d5883a
commit
72249b4766
2 changed files with 7 additions and 2 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue