From 19ae21d7ab673a333112f9cf394d2607f54faad9 Mon Sep 17 00:00:00 2001 From: Alexander Tumin Date: Sun, 31 Jul 2022 01:06:29 +0300 Subject: [PATCH] Commit list accounts state after difference in removed accounts is determined --- src/modules/lists.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/lists.js b/src/modules/lists.js index 0f751671..bf741858 100644 --- a/src/modules/lists.js +++ b/src/modules/lists.js @@ -57,12 +57,12 @@ const actions = { commit('setList', { id, title }) }, setListAccounts ({ rootState, commit }, { id, accountIds }) { - commit('setListAccounts', { id, accountIds }) rootState.api.backendInteractor.addAccountsToList({ id, accountIds }) rootState.api.backendInteractor.removeAccountsFromList({ id, accountIds: rootState.lists.allListsObject[id].accountIds.filter(id => !accountIds.includes(id)) }) + commit('setListAccounts', { id, accountIds }) }, deleteList ({ rootState, commit }, { id }) { rootState.api.backendInteractor.deleteList({ id })