From d7c68d408f07e997457798d4e8902338877f4223 Mon Sep 17 00:00:00 2001 From: taehoon Date: Fri, 30 Aug 2019 11:47:15 -0400 Subject: accept status id instead of status obj as statusoid prop --- src/components/conversation/conversation.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/components/conversation/conversation.js') diff --git a/src/components/conversation/conversation.js b/src/components/conversation/conversation.js index 49fa8612..2be74c1f 100644 --- a/src/components/conversation/conversation.js +++ b/src/components/conversation/conversation.js @@ -51,20 +51,20 @@ const conversation = { }, computed: { status () { - return this.statusoid + return this.$store.state.statuses.allStatusesObject[this.statusoid] }, statusId () { - if (this.statusoid.retweeted_status) { - return this.statusoid.retweeted_status.id + if (this.status.retweeted_status) { + return this.status.retweeted_status.id } else { - return this.statusoid.id + return this.status.id } }, conversationId () { - if (this.statusoid.retweeted_status) { - return this.statusoid.retweeted_status.statusnet_conversation_id + if (this.status.retweeted_status) { + return this.status.retweeted_status.statusnet_conversation_id } else { - return this.statusoid.statusnet_conversation_id + return this.status.statusnet_conversation_id } }, conversation () { @@ -127,8 +127,7 @@ const conversation = { }) .then(() => this.setHighlight(this.statusId)) } else { - const id = this.$route.params.id - this.$store.state.api.backendInteractor.fetchStatus({ id }) + this.$store.state.api.backendInteractor.fetchStatus({ id: this.statusoid }) .then((status) => this.$store.dispatch('addNewStatuses', { statuses: [status] })) .then(() => this.fetchConversation()) } -- cgit v1.2.3-70-g09d2