aboutsummaryrefslogtreecommitdiff
path: root/src/components/user_card/user_card.js
diff options
context:
space:
mode:
authorshpuld <shp@cock.li>2019-03-28 22:25:40 +0200
committershpuld <shp@cock.li>2019-03-28 22:25:40 +0200
commit31010779f6cc1abdd18fa117c0832e20623e1624 (patch)
tree2eaf8861e1baee86a1f4d33e0e10543e62cdd98c /src/components/user_card/user_card.js
parentfd12263cacd2a869ad61dd8580f918b45d9b2a51 (diff)
parentc829b1a5f4a013882ba298b0f95ec0f8b3ed3758 (diff)
Merge branch 'develop' into feature/mobile-improvements-3
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) {