diff options
| author | HJ <spam@hjkos.com> | 2019-01-25 13:29:24 +0000 |
|---|---|---|
| committer | HJ <spam@hjkos.com> | 2019-01-25 13:29:24 +0000 |
| commit | a733a33d36af6fed3f338449218686d22b1c9354 (patch) | |
| tree | 594fb0d9485377d6f185b7effd00a5350feeea31 /src | |
| parent | 28d1571530277e54be08e15d11e030f7722d1807 (diff) | |
| parent | eb339511864a89ecf2e8381a161034fdd6a8b130 (diff) | |
Merge branch 'hotfix-broken-convos' into 'develop'
Hotfix broken convos
See merge request pleroma/pleroma-fe!476
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/conversation/conversation.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/components/conversation/conversation.js b/src/components/conversation/conversation.js index ae8ab4fc..0ecbaddc 100644 --- a/src/components/conversation/conversation.js +++ b/src/components/conversation/conversation.js @@ -1,9 +1,9 @@ -import { reduce, filter, sortBy } from 'lodash' +import { reduce, filter } from 'lodash' import Status from '../status/status.vue' const sortById = (a, b) => { - const seqA = Number(a.action.id) - const seqB = Number(b.action.id) + const seqA = Number(a.id) + const seqB = Number(b.id) const isSeqA = !Number.isNaN(seqA) const isSeqB = !Number.isNaN(seqB) if (isSeqA && isSeqB) { @@ -13,13 +13,13 @@ const sortById = (a, b) => { } else if (!isSeqA && isSeqB) { return -1 } else { - return a.action.id > b.action.id ? -1 : 1 + return a.id > b.id ? -1 : 1 } } const sortAndFilterConversation = (conversation) => { conversation = filter(conversation, (status) => status.type !== 'retweet') - return sortBy(conversation, sortById) + return conversation.filter(_ => _).sort(sortById) } const conversation = { |
