commit: aadd36f3ec2d5131deae43a4e8042455a90ca16f
parent: 9ef0e65b25bf2bbf1153acf1c927cd66e0c0f217
Author: kaniini <ariadne@dereferenced.org>
Date: Thu, 26 Sep 2019 22:32:40 +0000
Merge branch 'refactor-who-to-follow' into 'develop'
Small refactoring in who to follow page
See merge request pleroma/pleroma-fe!932
Diffstat:
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/src/components/who_to_follow/who_to_follow.js b/src/components/who_to_follow/who_to_follow.js
@@ -16,21 +16,11 @@ const WhoToFollow = {
methods: {
showWhoToFollow (reply) {
reply.forEach((i, index) => {
- const user = {
- id: 0,
- name: i.display_name,
- screen_name: i.acct,
- profile_image_url: i.avatar || '/images/avi.png',
- profile_image_url_original: i.avatar || '/images/avi.png',
- statusnet_profile_url: i.url
- }
- this.users.push(user)
-
- this.$store.state.api.backendInteractor.fetchUser({ id: user.screen_name })
+ this.$store.state.api.backendInteractor.fetchUser({ id: i.acct })
.then((externalUser) => {
if (!externalUser.error) {
this.$store.commit('addNewUsers', [externalUser])
- user.id = externalUser.id
+ this.users.push(externalUser)
}
})
})