From 2a50831564c93dcd8f7c549b1d2e1fe5d3b99714 Mon Sep 17 00:00:00 2001 From: Samson Akol Date: Tue, 30 Jan 2024 21:57:06 +0300 Subject: [PATCH] Conditionalizes the loading action for quiz routes --- kolibri/plugins/coach/assets/src/app.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/kolibri/plugins/coach/assets/src/app.js b/kolibri/plugins/coach/assets/src/app.js index 5114bc3eb76..7f7a086d3a7 100644 --- a/kolibri/plugins/coach/assets/src/app.js +++ b/kolibri/plugins/coach/assets/src/app.js @@ -29,7 +29,17 @@ class CoachToolsModule extends KolibriApp { redirectBrowser(); return; } - this.store.dispatch('loading'); + + const skipLoading = [ + PageNames.EXAM_CREATION_ROOT, + PageNames.QUIZ_SECTION_EDITOR, + PageNames.QUIZ_REPLACE_QUESTIONS, + PageNames.QUIZ_SELECT_RESOURCES, + PageNames.BOOK_MARKED_RESOURCES, + ]; + if (!skipLoading.includes(to.name)) { + this.store.dispatch('loading'); + } const promises = []; // Clear the snackbar at every navigation to prevent it from re-appearing // when the next page component mounts.