From 7611d230ae29b6728141b3800e025c8b40260c34 Mon Sep 17 00:00:00 2001 From: Richard Tibbles Date: Wed, 4 May 2022 09:16:31 -0700 Subject: [PATCH] Move perseus specific logic into perseus renderer. --- kolibri/plugins/learn/assets/src/views/ExamPage/index.vue | 4 ---- .../perseus_viewer/assets/src/views/PerseusRendererIndex.vue | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/kolibri/plugins/learn/assets/src/views/ExamPage/index.vue b/kolibri/plugins/learn/assets/src/views/ExamPage/index.vue index 7f2771cc42..1d91676d95 100644 --- a/kolibri/plugins/learn/assets/src/views/ExamPage/index.vue +++ b/kolibri/plugins/learn/assets/src/views/ExamPage/index.vue @@ -301,11 +301,7 @@ }, watch: { attemptLogItemValue(newVal, oldVal) { - // HACK: manually dismiss the perseus renderer message when moving - // to a different item (fixes #3853) if (newVal !== oldVal) { - this.$refs.contentRenderer.$refs.contentView.dismissMessage && - this.$refs.contentRenderer.$refs.contentView.dismissMessage(); this.startTime = Date.now(); } }, diff --git a/kolibri/plugins/perseus_viewer/assets/src/views/PerseusRendererIndex.vue b/kolibri/plugins/perseus_viewer/assets/src/views/PerseusRendererIndex.vue index 67cdddae79..d17250cbfd 100644 --- a/kolibri/plugins/perseus_viewer/assets/src/views/PerseusRendererIndex.vue +++ b/kolibri/plugins/perseus_viewer/assets/src/views/PerseusRendererIndex.vue @@ -275,6 +275,9 @@ // Don't store blank state for another item. this.blankState = null; + // Clear any currently displayed messages when we render an item. + this.dismissMessage(); + // Create react component with current item data. // If the component already existed, this will perform an update. this.$set(