aboutsummaryrefslogtreecommitdiff
path: root/src/components/user_card/user_card.js
diff options
context:
space:
mode:
authorHJ <30-hj@users.noreply.git.pleroma.social>2019-03-25 19:21:48 +0000
committerHJ <30-hj@users.noreply.git.pleroma.social>2019-03-25 19:21:48 +0000
commit04217fc6604ff6c4454ba0291c081a927a46d03c (patch)
treee802758f03cf83e8089cbfa7fcec1aa520f43387 /src/components/user_card/user_card.js
parentfe13b1b75a42d03a813072633194f89385acec8e (diff)
parent854d0e80512d2da80cd5153144698a5148da4aa6 (diff)
Merge branch 'develop' into 'mastoapi/friends-tl'
# Conflicts: # src/services/api/api.service.js
Diffstat (limited to 'src/components/user_card/user_card.js')
-rw-r--r--src/components/user_card/user_card.js22
1 files changed, 7 insertions, 15 deletions
diff --git a/src/components/user_card/user_card.js b/src/components/user_card/user_card.js
index b07da675..197c61d5 100644
--- a/src/components/user_card/user_card.js
+++ b/src/components/user_card/user_card.js
@@ -121,24 +121,16 @@ export default {
})
},
blockUser () {
- const store = this.$store
- store.state.api.backendInteractor.blockUser(this.user.id)
- .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 })
- })
+ this.$store.dispatch('blockUser', this.user.id)
},
unblockUser () {
- const store = this.$store
- store.state.api.backendInteractor.unblockUser(this.user.id)
- .then((unblockedUser) => store.commit('addNewUsers', [unblockedUser]))
+ this.$store.dispatch('unblockUser', this.user.id)
},
- toggleMute () {
- const store = this.$store
- store.commit('setMuted', {user: this.user, muted: !this.user.muted})
- store.state.api.backendInteractor.setUserMute(this.user)
+ muteUser () {
+ this.$store.dispatch('muteUser', this.user.id)
+ },
+ unmuteUser () {
+ this.$store.dispatch('unmuteUser', this.user.id)
},
setProfileView (v) {
if (this.switcher) {