diff options
| author | Shpuld Shpludson <shp@cock.li> | 2019-03-07 16:07:01 +0000 |
|---|---|---|
| committer | Shpuld Shpludson <shp@cock.li> | 2019-03-07 16:07:01 +0000 |
| commit | e3b3ef156b9cfd5d60827964068b790bf6aae1b2 (patch) | |
| tree | 95bfade75e0b997dc6d80d557c02a0ab186f5ec0 /src/components/user_card_content/user_card_content.js | |
| parent | 2baff88e3ff74dc46ddd2cb614eda89ce532dd77 (diff) | |
| parent | 7698a6fb0dad962a15855adc2a9c4134abe13de7 (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.js | 14 |
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 |
