From cb122e3a99cbb5c3b76b9c5b15a9dd69ef3ed323 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 25 Mar 2019 20:11:06 +0200 Subject: [PATCH] review --- src/components/conversation/conversation.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/components/conversation/conversation.js b/src/components/conversation/conversation.js index ff18a9c8..e806be8e 100644 --- a/src/components/conversation/conversation.js +++ b/src/components/conversation/conversation.js @@ -27,7 +27,7 @@ const conversation = { data () { return { highlight: null, - relevantIds: [] + converationStatusIds: [] } }, props: [ @@ -39,8 +39,8 @@ const conversation = { return this.statusoid }, idsToShow () { - if (this.relevantIds.length > 0) { - return this.relevantIds + if (this.converationStatusIds.length > 0) { + return this.converationStatusIds } else if (this.statusId) { return [this.statusId] } else { @@ -96,12 +96,11 @@ const conversation = { methods: { fetchConversation () { if (this.status) { - const conversationId = this.status.id - this.$store.state.api.backendInteractor.fetchConversation({id: conversationId}) + this.$store.state.api.backendInteractor.fetchConversation({id: this.status.id}) .then(({ancestors, descendants}) => { this.$store.dispatch('addNewStatuses', { statuses: ancestors }) this.$store.dispatch('addNewStatuses', { statuses: descendants }) - set(this, 'relevantIds', [].concat( + set(this, 'converationStatusIds', [].concat( ancestors.map(_ => _.id), this.statusId, descendants.map(_ => _.id)))