aboutsummaryrefslogtreecommitdiff
path: root/src/components/conversation/conversation.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/conversation/conversation.js')
-rw-r--r--src/components/conversation/conversation.js19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/components/conversation/conversation.js b/src/components/conversation/conversation.js
index c18781de..48b8aaaa 100644
--- a/src/components/conversation/conversation.js
+++ b/src/components/conversation/conversation.js
@@ -9,9 +9,9 @@ const sortById = (a, b) => {
if (isSeqA && isSeqB) {
return seqA < seqB ? -1 : 1
} else if (isSeqA && !isSeqB) {
- return 1
- } else if (!isSeqA && isSeqB) {
return -1
+ } else if (!isSeqA && isSeqB) {
+ return 1
} else {
return a.id < b.id ? -1 : 1
}
@@ -36,6 +36,13 @@ const conversation = {
status () {
return this.statusoid
},
+ statusId () {
+ if (this.statusoid.retweeted_status) {
+ return this.statusoid.retweeted_status.id
+ } else {
+ return this.statusoid.id
+ }
+ },
conversation () {
if (!this.status) {
return []
@@ -79,7 +86,7 @@ const conversation = {
const conversationId = this.status.statusnet_conversation_id
this.$store.state.api.backendInteractor.fetchConversation({id: conversationId})
.then((statuses) => this.$store.dispatch('addNewStatuses', { statuses }))
- .then(() => this.setHighlight(this.statusoid.id))
+ .then(() => this.setHighlight(this.statusId))
} else {
const id = this.$route.params.id
this.$store.state.api.backendInteractor.fetchStatus({id})
@@ -91,11 +98,7 @@ const conversation = {
return this.replies[id] || []
},
focused (id) {
- if (this.statusoid.retweeted_status) {
- return (id === this.statusoid.retweeted_status.id)
- } else {
- return (id === this.statusoid.id)
- }
+ return id === this.statusId
},
setHighlight (id) {
this.highlight = id