mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-21 22:11:26 +00:00
Update context menu, add mute/block/unfollow actions and update relationship store accordingly
This commit is contained in:
parent
b8e96a5ff3
commit
81d1e0fdab
2 changed files with 951 additions and 715 deletions
File diff suppressed because it is too large
Load diff
|
@ -91,6 +91,8 @@
|
|||
v-on:delete="deletePost"
|
||||
v-on:report-modal="handleReport"
|
||||
v-on:edit="handleEdit"
|
||||
v-on:muted="handleMuted"
|
||||
v-on:unfollow="handleUnfollow"
|
||||
/>
|
||||
|
||||
<likes-modal
|
||||
|
@ -543,6 +545,7 @@
|
|||
|
||||
deletePost() {
|
||||
this.feed.splice(this.postIndex, 1);
|
||||
this.forceUpdateIdx++;
|
||||
},
|
||||
|
||||
counterChange(index, type) {
|
||||
|
@ -788,6 +791,21 @@
|
|||
.then(res => {
|
||||
})
|
||||
},
|
||||
|
||||
handleMuted(post) {
|
||||
this.feed = this.feed.filter(p => {
|
||||
return p.account.id !== post.account.id;
|
||||
});
|
||||
},
|
||||
|
||||
handleUnfollow(post) {
|
||||
if(this.scope === 'home') {
|
||||
this.feed = this.feed.filter(p => {
|
||||
return p.account.id !== post.account.id;
|
||||
});
|
||||
}
|
||||
this.updateProfile({ following_count: this.profile.following_count - 1 });
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
|
|
Loading…
Reference in a new issue