diff --git a/frontend/src/dialogues/socialnetwork/VocabPracticeDialog.vue b/frontend/src/dialogues/socialnetwork/VocabPracticeDialog.vue index b485e5d..39e09f9 100644 --- a/frontend/src/dialogues/socialnetwork/VocabPracticeDialog.vue +++ b/frontend/src/dialogues/socialnetwork/VocabPracticeDialog.vue @@ -159,6 +159,7 @@ import apiClient from '@/utils/axios.js'; const PRACTICE_MIN_EXPOSURES = 3; const SRS_SESSION_STORAGE_VERSION = 2; +const HARD_REQUIRED_CONSECUTIVE_CORRECT = 5; export default { name: 'VocabPracticeDialog', @@ -303,10 +304,9 @@ export default { return this.pool.filter((item) => Boolean(this.hardVocabMap[this.getHardKey(item)])); }, hardRemainingCount() { - const requiredConsecutiveCorrect = 2; return this.hardPoolItems.filter((item) => { const key = this.getHardKey(item); - return (Number(this.hardMasteryByKey[key]) || 0) < requiredConsecutiveCorrect; + return (Number(this.hardMasteryByKey[key]) || 0) < HARD_REQUIRED_CONSECUTIVE_CORRECT; }).length; } }, @@ -782,10 +782,9 @@ export default { return items.find((it) => it.id === nextId) || null; } if (this.hardPhaseActive) { - const requiredConsecutiveCorrect = 2; const hardItems = this.hardPoolItems.filter((item) => { const key = this.getHardKey(item); - return (Number(this.hardMasteryByKey[key]) || 0) < requiredConsecutiveCorrect; + return (Number(this.hardMasteryByKey[key]) || 0) < HARD_REQUIRED_CONSECUTIVE_CORRECT; }); if (hardItems.length === 0) { this.hardPhaseActive = false; @@ -939,7 +938,7 @@ export default { if (this.hardPhaseActive && this.current) { const key = this.getHardKey(this.current); this.hardMasteryByKey[key] = Math.max(0, Number(this.hardMasteryByKey[key]) || 0) + 1; - if ((Number(this.hardMasteryByKey[key]) || 0) >= 2 && this.hardVocabMap[key]) { + if ((Number(this.hardMasteryByKey[key]) || 0) >= HARD_REQUIRED_CONSECUTIVE_CORRECT && this.hardVocabMap[key]) { const next = { ...this.hardVocabMap }; delete next[key]; this.hardVocabMap = next;