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-24 17:15:21 +0000
committerHJ <30-hj@users.noreply.git.pleroma.social>2019-03-24 17:15:21 +0000
commit01d05316998f90451e920f8ac8d4c264a13b0cd7 (patch)
tree99730bd30e73e6dc1b81eba924426425ace0fa5f /src/components/user_card/user_card.js
parentf86a5dc80421f496a893efaa98f12f831da0adcb (diff)
parentf03747e84124ea45efd16a2f386d7f14996f736a (diff)
Merge branch '227-manage-blocks-mutes' into 'develop'
Transition to MastoAPI: Mute & Block and Add Mutes management tab See merge request pleroma/pleroma-fe!611
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) {