Skip to content
Snippets Groups Projects
Commit a39fc49e authored by Dave LiPuma's avatar Dave LiPuma
Browse files

#433 - update sort by for conversation

parent e24145e2
No related branches found
No related tags found
2 merge requests!1028`master` refresh with `develop`,!674Issue 433 status reply form
......@@ -5,7 +5,19 @@ import Status from '../status/status.vue'
const sortById = (a, b) => {
const idA = a.type === 'retweet' ? a.retweeted_status.id : a.id
const idB = b.type === 'retweet' ? b.retweeted_status.id : b.id
return idA < idB ? -1 : 1
const seqA = Number(idA)
const seqB = Number(idB)
const isSeqA = !Number.isNaN(seqA)
const isSeqB = !Number.isNaN(seqB)
if (isSeqA && isSeqB) {
return seqA < seqB ? -1 : 1
} else if (isSeqA && !isSeqB) {
return -1
} else if (!isSeqA && isSeqB) {
return 1
} else {
return idA < idB ? -1 : 1
}
}
const sortAndFilterConversation = (conversation, statusoid) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment