From f3fe0019f88fd5bede097c22a44d4ac82928a2f2 Mon Sep 17 00:00:00 2001 From: paulbusse Date: Mon, 9 Nov 2020 20:50:32 +0100 Subject: [PATCH] views/plan/LessonSummaryPage/ResourceListTable.vue:AutoSave - added an updateCurrentLesson also when the resources save succeeds to ensure that the memory image refers to the changes resources in this file (Remove lesson or reorder lesson) --- .../plan/LessonSummaryPage/ResourceListTable.vue | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/kolibri/plugins/coach/assets/src/views/plan/LessonSummaryPage/ResourceListTable.vue b/kolibri/plugins/coach/assets/src/views/plan/LessonSummaryPage/ResourceListTable.vue index 518e2fbbee5..155a80888d4 100644 --- a/kolibri/plugins/coach/assets/src/views/plan/LessonSummaryPage/ResourceListTable.vue +++ b/kolibri/plugins/coach/assets/src/views/plan/LessonSummaryPage/ResourceListTable.vue @@ -193,11 +193,15 @@ this.showSnackbarNotification('resourceOrderSaved'); }, autoSave(id, resources) { - this.saveLessonResources({ lessonId: id, resources: resources }).catch(() => { - this.updateCurrentLesson(id).then(currentLesson => { - this.setWorkingResources(currentLesson.resources); + this.saveLessonResources({ lessonId: id, resources: resources }) + .then(() => { + this.updateCurrentLesson(id); + }) + .catch(() => { + this.updateCurrentLesson(id).then(currentLesson => { + this.setWorkingResources(currentLesson.resources); + }); }); - }); }, }, $trs: {