minor UI improvements - keep current behavior of showing originating post initially

This commit is contained in:
Henry Jameson 2019-03-21 23:27:14 +02:00
parent ee94a6732a
commit d6c62fa50f
2 changed files with 12 additions and 4 deletions

View file

@ -37,6 +37,15 @@ const conversation = {
status () {
return this.statusoid
},
idsToShow () {
if (this.relevantIds.length > 0) {
return this.relevantIds
} else if (this.statusId) {
return [this.statusId]
} else {
return []
}
},
statusId () {
if (this.statusoid.retweeted_status) {
return this.statusoid.retweeted_status.id
@ -50,7 +59,7 @@ const conversation = {
}
const statusesObject = this.$store.state.statuses.allStatusesObject
const conversation = this.relevantIds.reduce((acc, id) => {
const conversation = this.idsToShow.reduce((acc, id) => {
acc.push(statusesObject[id])
return acc
}, [])