diff options
author | Cyrille Bollu <cyrpub@bollu.be> | 2019-10-07 15:58:20 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2020-10-13 23:51:41 +0200 |
commit | 3421661ee95d1357b8ad0cc5183aa88e62aed04e (patch) | |
tree | c795fc5e7f4be3c225f6119552a273594328a6bf | |
parent | f57f0c509348c3f5ddeeb424078835c899b98db5 (diff) |
MISC: Adds a getAllAccounts() getter
Signed-off-by: Cyrille Bollu <cyrpub@bollu.be>
-rw-r--r-- | src/store/account.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/store/account.js b/src/store/account.js index 91d7b272..f23295cc 100644 --- a/src/store/account.js +++ b/src/store/account.js @@ -46,13 +46,10 @@ const mutations = { let users = [] for (var index in data) { const actor = data[index].actor_info - if (typeof actor !== 'undefined' && account !== actor.account) { - users.push(actor.id) - addAccount(state, { - actorId: actor.id, - data: actor - }) - } + addAccount(state, { + actorId: actor.id, + data: actor + }) } Vue.set(state.accounts[_getActorIdForAccount(account)], 'followersList', users) }, @@ -79,6 +76,9 @@ const mutations = { } const getters = { + getAllAccounts(state) { + return (account) => { return state.accounts } + }, getAccount(state, getters) { return (account) => { return state.accounts[_getActorIdForAccount(account)] |