Loading...
@@ -106,6 +106,8 @@
size="small"
v-on:status-delete="deleteStatus"
v-on:comment-focus="commentFocus"
+ v-on:followed="followedAccount"
+ v-on:unfollowed="unfollowedAccount"
/>
@@ -1067,7 +1069,29 @@
this.feed = this.feed.filter(s => {
return s.id != status;
});
- }
+ },
+
+ followedAccount(id) {
+ this.feed = this.feed.map(s => {
+ if(s.account.id == id) {
+ if(s.hasOwnProperty('relationship') && s.relationship.following == false) {
+ s.relationship.following = true;
+ }
+ }
+ return s;
+ });
+ },
+
+ unfollowedAccount(id) {
+ this.feed = this.feed.map(s => {
+ if(s.account.id == id) {
+ if(s.hasOwnProperty('relationship') && s.relationship.following == true) {
+ s.relationship.following = false;
+ }
+ }
+ return s;
+ });
+ },
},
beforeDestroy () {