mirror of
https://akkoma.dev/AkkomaGang/akkoma-fe.git
synced 2024-11-12 19:44:53 +00:00
Small refactoring in who to follow page
This commit is contained in:
parent
9ef0e65b25
commit
bc17839e52
1 changed files with 2 additions and 12 deletions
|
@ -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)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue