diff --git a/kolibri/plugins/learn/assets/src/state/actions.js b/kolibri/plugins/learn/assets/src/state/actions.js index 45086f38091..d77897ac5e3 100644 --- a/kolibri/plugins/learn/assets/src/state/actions.js +++ b/kolibri/plugins/learn/assets/src/state/actions.js @@ -481,6 +481,7 @@ function showContentUnavailable(store) { function redirectToChannelSearch(store) { store.dispatch('SET_PAGE_NAME', PageNames.SEARCH_ROOT); + store.dispatch('SET_PAGE_STATE', {}); store.dispatch('CORE_SET_PAGE_LOADING', true); store.dispatch('CORE_SET_ERROR', null); store.dispatch('CORE_SET_TITLE', 'Search'); @@ -501,6 +502,7 @@ function redirectToChannelSearch(store) { function showSearch(store, channelId, searchTerm) { store.dispatch('SET_PAGE_NAME', PageNames.SEARCH); + store.dispatch('SET_PAGE_STATE', {}); store.dispatch('CORE_SET_PAGE_LOADING', true); store.dispatch('CORE_SET_ERROR', null); store.dispatch('CORE_SET_TITLE', 'Search'); diff --git a/kolibri/plugins/learn/assets/src/state/store.js b/kolibri/plugins/learn/assets/src/state/store.js index 2f7a062ad15..aac0db838ce 100644 --- a/kolibri/plugins/learn/assets/src/state/store.js +++ b/kolibri/plugins/learn/assets/src/state/store.js @@ -21,8 +21,7 @@ const mutations = { state.pageName = name; }, SET_PAGE_STATE(state, pageState) { - const oldPageState = state.pageState; - state.pageState = Object.assign(oldPageState, pageState); + state.pageState = pageState; }, SET_EXAM_LOG(state, examLog) { state.examLog = examLog; diff --git a/kolibri/plugins/media_player/assets/src/views/index.vue b/kolibri/plugins/media_player/assets/src/views/index.vue index 0884f43bf01..28a43fa7755 100644 --- a/kolibri/plugins/media_player/assets/src/views/index.vue +++ b/kolibri/plugins/media_player/assets/src/views/index.vue @@ -290,7 +290,6 @@ window.addEventListener('resize', this.throttledResizePlayer); }, beforeDestroy() { - this.recordProgress(); this.$emit('stopTracking'); window.removeEventListener('resize', this.throttledResizePlayer); this.player.dispose();