diff --git a/kolibri/plugins/learn/assets/src/composables/useDownloadRequests.js b/kolibri/plugins/learn/assets/src/composables/useDownloadRequests.js index f286696c0c7..6229cc9a5eb 100644 --- a/kolibri/plugins/learn/assets/src/composables/useDownloadRequests.js +++ b/kolibri/plugins/learn/assets/src/composables/useDownloadRequests.js @@ -147,11 +147,21 @@ export default function useDownloadRequests(store) { return Promise.resolve(); } - function removeDownloadRequest(contentRequest) { + function removeDownloadRequest(contentNodeId) { + const contentRequest = downloadRequestMap[contentNodeId]; + if (!contentRequest) { + return Promise.resolve(); + } ContentRequestResource.deleteModel({ id: contentRequest.id, }); Vue.delete(downloadRequestMap, contentRequest.contentnode_id); + store.commit('CORE_CREATE_SNACKBAR', { + text: downloadRequestsTranslator.$tr('resourceRemoved'), + backdrop: false, + forceReuse: true, + autoDismiss: true, + }); return Promise.resolve(); } diff --git a/kolibri/plugins/learn/assets/src/my_downloads/views/DownloadsList/index.vue b/kolibri/plugins/learn/assets/src/my_downloads/views/DownloadsList/index.vue index 21114bf81d9..765f8cc03d8 100644 --- a/kolibri/plugins/learn/assets/src/my_downloads/views/DownloadsList/index.vue +++ b/kolibri/plugins/learn/assets/src/my_downloads/views/DownloadsList/index.vue @@ -8,7 +8,7 @@ :totalPageNumber="totalPageNumber" :numFilteredItems="downloadItemListLength" > - + - - - - -