fix(VocabPracticeDialog): adjust success tracking for hard-phase drills
All checks were successful
Deploy to production / deploy (push) Successful in 1m56s
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:
@@ -933,8 +933,13 @@ export default {
|
||||
if (!id) return;
|
||||
const st = this.perId[id] || { c: 0, w: 0, streak: 0, lastAsked: 0 };
|
||||
if (isCorrect) {
|
||||
st.c += 1;
|
||||
st.streak = st.streak >= 0 ? st.streak + 1 : 1;
|
||||
// Hard-phase drills are tracked separately via hardMasteryByKey.
|
||||
// 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) {
|
||||
const key = this.getHardKey(this.current);
|
||||
this.hardMasteryByKey[key] = Math.max(0, Number(this.hardMasteryByKey[key]) || 0) + 1;
|
||||
|
||||
Reference in New Issue
Block a user