1
0
Fork 0
forked from mirror/pixelfed

Update context menu, add mute/block/unfollow actions and update relationship store accordingly

This commit is contained in:
Daniel Supernault 2024-04-06 02:27:22 -06:00
parent b8e96a5ff3
commit 81d1e0fdab
No known key found for this signature in database
GPG key ID: 23740873EE6F76A1
2 changed files with 951 additions and 715 deletions

File diff suppressed because it is too large Load diff

View file

@ -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: {