summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCyrille Bollu <cyrpub@bollu.be>2019-10-07 15:58:20 +0200
committerRobin Appelman <robin@icewind.nl>2020-10-13 23:51:41 +0200
commit3421661ee95d1357b8ad0cc5183aa88e62aed04e (patch)
treec795fc5e7f4be3c225f6119552a273594328a6bf
parentf57f0c509348c3f5ddeeb424078835c899b98db5 (diff)
MISC: Adds a getAllAccounts() getter
Signed-off-by: Cyrille Bollu <cyrpub@bollu.be>
-rw-r--r--src/store/account.js14
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)]