From 4b3de109faa8e4cebbdbf1345cc2dce1ed46e33f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Lesage?= <tlesage@teklia.com> Date: Tue, 30 Apr 2024 10:38:30 +0200 Subject: [PATCH] Remove call to navigation store in element vuex store --- src/store/elements.js | 2 -- tests/unit/store/elements.spec.js | 4 ---- 2 files changed, 6 deletions(-) diff --git a/src/store/elements.js b/src/store/elements.js index 2698c2dd4..6459d61d5 100644 --- a/src/store/elements.js +++ b/src/store/elements.js @@ -317,7 +317,6 @@ export const actions = { try { await api.deleteElement({ id, delete_children: true }) commit('remove', id) - commit('navigation/addToScheduledDeletion', id, { root: true }) if (id === rootState.annotation.selectedElement?.id) { commit('annotation/selectElement', null, { root: true }) } commit('notifications/notify', { type: 'success', text: 'Element deletion has been scheduled.' }, { root: true }) } catch (err) { @@ -332,7 +331,6 @@ export const actions = { try { await api.moveElement(payload) commit('remove', payload.source) - commit('navigation/addToScheduledDeletion', payload.source, { root: true }) commit('notifications/notify', { type: 'success', text: 'Element moving has been scheduled.' }, { root: true }) } catch (err) { commit('notifications/notify', { type: 'error', text: errorParser(err) }, { root: true }) diff --git a/tests/unit/store/elements.spec.js b/tests/unit/store/elements.spec.js index d094abb21..e0b8b9d93 100644 --- a/tests/unit/store/elements.spec.js +++ b/tests/unit/store/elements.spec.js @@ -599,10 +599,6 @@ describe('elements', () => { mutation: 'elements/remove', payload: 'element' }, - { - mutation: 'navigation/addToScheduledDeletion', - payload: 'element' - }, { mutation: 'notifications/notify', payload: { type: 'success', text: 'Element deletion has been scheduled.' } -- GitLab