Commit list accounts state after difference in removed accounts is determined
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful

This commit is contained in:
Alexander Tumin 2022-07-31 01:06:29 +03:00
parent 751fd5917b
commit 19ae21d7ab

View file

@ -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 })