fix(VocabPracticeDialog): adjust success tracking for hard-phase drills
All checks were successful
Deploy to production / deploy (push) Successful in 1m56s

- Updated the success tracking logic to prevent inflating normal success counters during hard-phase drills, ensuring accurate representation of user progress.
- Introduced a condition to separate tracking for hard-phase activities, enhancing the integrity of vocabulary rotation and user experience.
This commit is contained in:
Torsten Schulz (local)
2026-04-22 11:55:40 +02:00
parent 677e4c674e
commit 478a7ffc96

View File

@@ -933,8 +933,13 @@ export default {
if (!id) return; if (!id) return;
const st = this.perId[id] || { c: 0, w: 0, streak: 0, lastAsked: 0 }; const st = this.perId[id] || { c: 0, w: 0, streak: 0, lastAsked: 0 };
if (isCorrect) { if (isCorrect) {
st.c += 1; // Hard-phase drills are tracked separately via hardMasteryByKey.
st.streak = st.streak >= 0 ? st.streak + 1 : 1; // We avoid inflating normal success counters here, otherwise the
// graduated vocab can become too unlikely in regular rotation.
if (!this.hardPhaseActive) {
st.c += 1;
st.streak = st.streak >= 0 ? st.streak + 1 : 1;
}
if (this.hardPhaseActive && this.current) { if (this.hardPhaseActive && this.current) {
const key = this.getHardKey(this.current); const key = this.getHardKey(this.current);
this.hardMasteryByKey[key] = Math.max(0, Number(this.hardMasteryByKey[key]) || 0) + 1; this.hardMasteryByKey[key] = Math.max(0, Number(this.hardMasteryByKey[key]) || 0) + 1;