diff --git a/frontend/src/views/social/VocabLessonView.vue b/frontend/src/views/social/VocabLessonView.vue index 3108d74..7423bd7 100644 --- a/frontend/src/views/social/VocabLessonView.vue +++ b/frontend/src/views/social/VocabLessonView.vue @@ -414,6 +414,24 @@ export default { } } }, + watch: { + courseId(newVal, oldVal) { + if (newVal !== oldVal) { + // Reset Flags beim Kurswechsel + this.isCheckingLessonCompletion = false; + this.isNavigatingToNext = false; + this.loadLesson(); + } + }, + lessonId(newVal, oldVal) { + if (newVal !== oldVal) { + // Reset Flags beim Lektionswechsel + this.isCheckingLessonCompletion = false; + this.isNavigatingToNext = false; + this.loadLesson(); + } + } + }, methods: { _extractVocabFromExercises(exercises) { // Sicherstellen, dass exercises ein Array ist @@ -530,24 +548,6 @@ export default { console.log(`[_extractVocabFromExercises] Ergebnis:`, result.length, 'Vokabeln'); return result; }, - courseId(newVal, oldVal) { - if (newVal !== oldVal) { - // Reset Flags beim Kurswechsel - this.isCheckingLessonCompletion = false; - this.isNavigatingToNext = false; - this.loadLesson(); - } - }, - lessonId(newVal, oldVal) { - if (newVal !== oldVal) { - // Reset Flags beim Lektionswechsel - this.isCheckingLessonCompletion = false; - this.isNavigatingToNext = false; - this.loadLesson(); - } - } - }, - methods: { async loadLesson() { // Verhindere mehrfaches Laden if (this.loading) {