diff --git a/resources/assets/js/components/Timeline.vue b/resources/assets/js/components/Timeline.vue index cfd59ac62..20002a035 100644 --- a/resources/assets/js/components/Timeline.vue +++ b/resources/assets/js/components/Timeline.vue @@ -12,7 +12,7 @@
-
+
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 () {