aboutsummaryrefslogtreecommitdiff
path: root/src/components/user_card/user_card.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/user_card/user_card.js')
-rw-r--r--src/components/user_card/user_card.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/components/user_card/user_card.js b/src/components/user_card/user_card.js
index 81c938c0..80d15a27 100644
--- a/src/components/user_card/user_card.js
+++ b/src/components/user_card/user_card.js
@@ -100,22 +100,30 @@ export default {
},
methods: {
followUser () {
+ const store = this.$store
this.followRequestInProgress = true
- requestFollow(this.user, this.$store).then(({sent}) => {
+ requestFollow(this.user, store).then(({sent}) => {
this.followRequestInProgress = false
this.followRequestSent = sent
})
},
unfollowUser () {
+ const store = this.$store
this.followRequestInProgress = true
- requestUnfollow(this.user, this.$store).then(() => {
+ requestUnfollow(this.user, store).then(() => {
this.followRequestInProgress = false
+ store.commit('removeStatus', { timeline: 'friends', userId: this.user.id })
})
},
blockUser () {
const store = this.$store
store.state.api.backendInteractor.blockUser(this.user.id)
- .then((blockedUser) => store.commit('addNewUsers', [blockedUser]))
+ .then((blockedUser) => {
+ store.commit('addNewUsers', [blockedUser])
+ store.commit('removeStatus', { timeline: 'friends', userId: this.user.id })
+ store.commit('removeStatus', { timeline: 'public', userId: this.user.id })
+ store.commit('removeStatus', { timeline: 'publicAndExternal', userId: this.user.id })
+ })
},
unblockUser () {
const store = this.$store