aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/components/conversation-page/conversation-page.js8
-rw-r--r--src/components/conversation-page/conversation-page.vue2
-rw-r--r--src/components/conversation/conversation.js17
3 files changed, 11 insertions, 16 deletions
diff --git a/src/components/conversation-page/conversation-page.js b/src/components/conversation-page/conversation-page.js
index 1da70ce9..8f996be1 100644
--- a/src/components/conversation-page/conversation-page.js
+++ b/src/components/conversation-page/conversation-page.js
@@ -5,12 +5,8 @@ const conversationPage = {
Conversation
},
computed: {
- statusoid () {
- const id = this.$route.params.id
- const statuses = this.$store.state.statuses.allStatusesObject
- const status = statuses[id]
-
- return status
+ statusId () {
+ return this.$route.params.id
}
}
}
diff --git a/src/components/conversation-page/conversation-page.vue b/src/components/conversation-page/conversation-page.vue
index 532f785c..3db63343 100644
--- a/src/components/conversation-page/conversation-page.vue
+++ b/src/components/conversation-page/conversation-page.vue
@@ -2,7 +2,7 @@
<conversation
:collapsable="false"
is-page="true"
- :statusoid="statusoid"
+ :statusoid="statusId"
/>
</template>
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())
}