diff options
| author | Hakaba Hitoyo <hakabahitoyo@yahoo.co.jp> | 2019-09-26 22:32:39 +0000 |
|---|---|---|
| committer | kaniini <ariadne@dereferenced.org> | 2019-09-26 22:32:39 +0000 |
| commit | bc17839e526f88dc5ce2ef75b72bdd97c118479a (patch) | |
| tree | dd289cf848be3c4064a35220eb90b503a2a12578 /src/components/who_to_follow | |
| parent | 9ef0e65b25bf2bbf1153acf1c927cd66e0c0f217 (diff) | |
Small refactoring in who to follow page
Diffstat (limited to 'src/components/who_to_follow')
| -rw-r--r-- | src/components/who_to_follow/who_to_follow.js | 14 |
1 files 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 index 1aa3a4cd..ecd97dd7 100644 --- 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) } }) }) |
