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

pull/5032/head
Daniel Supernault 2024-04-06 02:27:22 -06:00
rodzic b8e96a5ff3
commit 81d1e0fdab
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 23740873EE6F76A1
2 zmienionych plików z 951 dodań i 715 usunięć

Wyświetl plik

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