forked from AkkomaGang/akkoma-fe
refactoring
This commit is contained in:
parent
95bc2d727b
commit
ab19669bf1
1 changed files with 14 additions and 24 deletions
|
@ -251,10 +251,8 @@ const UserSettings = {
|
|||
}
|
||||
})
|
||||
},
|
||||
getFollowsContent () {
|
||||
return this.$store.state.api.backendInteractor.exportFriends({ id: this.$store.state.users.currentUser.id })
|
||||
.then((users) => {
|
||||
// Get all the friends addresses
|
||||
generateExportableUsersContent (users) {
|
||||
// Get addresses
|
||||
return users.map((user) => {
|
||||
// check is it's a local user
|
||||
if (user && user.is_local) {
|
||||
|
@ -264,22 +262,14 @@ const UserSettings = {
|
|||
}
|
||||
return user.screen_name
|
||||
}).join('\n')
|
||||
})
|
||||
},
|
||||
getFollowsContent () {
|
||||
return this.$store.state.api.backendInteractor.exportFriends({ id: this.$store.state.users.currentUser.id })
|
||||
.then(this.generateExportableUsersContent)
|
||||
},
|
||||
getBlocksContent () {
|
||||
return this.$store.state.api.backendInteractor.fetchBlocks()
|
||||
.then((users) => {
|
||||
// Get all the friends addresses
|
||||
return users.map((user) => {
|
||||
// check is it's a local user
|
||||
if (user && user.is_local) {
|
||||
// append the instance address
|
||||
// eslint-disable-next-line no-undef
|
||||
return user.screen_name + '@' + location.hostname
|
||||
}
|
||||
return user.screen_name
|
||||
}).join('\n')
|
||||
})
|
||||
.then(this.generateExportableUsersContent)
|
||||
},
|
||||
confirmDelete () {
|
||||
this.deletingAccount = true
|
||||
|
|
Loading…
Reference in a new issue