Add back relative numbering.

This commit is contained in:
Roger Braun 2017-07-29 19:10:09 +02:00
parent 32e20b2e02
commit 9c5f001fd2

View file

@ -35,15 +35,17 @@ const conversation = {
return sortAndFilterConversation(conversation) return sortAndFilterConversation(conversation)
}, },
replies () { replies () {
let i = 1
return reduce(this.conversation, (result, {id, in_reply_to_status_id}) => { return reduce(this.conversation, (result, {id, in_reply_to_status_id}) => {
const irid = Number(in_reply_to_status_id) const irid = Number(in_reply_to_status_id)
if (irid) { if (irid) {
result[irid] = result[irid] || [] result[irid] = result[irid] || []
result[irid].push({ result[irid].push({
name: `#${id}`, name: `#${i}`,
id: id id: id
}) })
} }
i++
return result return result
}, {}) }, {})
} }