aboutsummaryrefslogtreecommitdiff
path: root/src/components/user_card_content/user_card_content.js
diff options
context:
space:
mode:
authorShpuld Shpludson <shp@cock.li>2019-03-07 16:07:01 +0000
committerShpuld Shpludson <shp@cock.li>2019-03-07 16:07:01 +0000
commite3b3ef156b9cfd5d60827964068b790bf6aae1b2 (patch)
tree95bfade75e0b997dc6d80d557c02a0ab186f5ec0 /src/components/user_card_content/user_card_content.js
parent2baff88e3ff74dc46ddd2cb614eda89ce532dd77 (diff)
parent7698a6fb0dad962a15855adc2a9c4134abe13de7 (diff)
Merge branch 'fix/remove-posts-immediately-by-blocking-someone' into 'develop'
#330 Remove posts immediately by blocking someone See merge request pleroma/pleroma-fe!589
Diffstat (limited to 'src/components/user_card_content/user_card_content.js')
-rw-r--r--src/components/user_card_content/user_card_content.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/components/user_card_content/user_card_content.js b/src/components/user_card_content/user_card_content.js
index 7a7b89d4..35139504 100644
--- a/src/components/user_card_content/user_card_content.js
+++ b/src/components/user_card_content/user_card_content.js
@@ -93,22 +93,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