diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-04-09 15:28:10 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-04-09 15:28:10 +0200 |
| commit | 5cd2f7d4f985e97580617c1bafc830054eea73da (patch) | |
| tree | f6855e9487af2d7c42c825228a3af5e7ef98321e /public/assets/js | |
| parent | 7dce65b71510836a6615ad914f313c19092f1c7e (diff) | |
sort by id normally, except for the old threads where the order is messed up
Diffstat (limited to 'public/assets/js')
| -rw-r--r-- | public/assets/js/lib/views/details/comments.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/public/assets/js/lib/views/details/comments.js b/public/assets/js/lib/views/details/comments.js index 085873e..688750c 100644 --- a/public/assets/js/lib/views/details/comments.js +++ b/public/assets/js/lib/views/details/comments.js @@ -21,11 +21,16 @@ var CommentsView = FormView.extend({ .forEach(this.prependComment.bind(this)) this.$el.prepend(this.$formRow) } - else { + else if (thread.id < 4125) { comments .sort((a,b) => cmp(a.date, b.date)) .forEach(this.appendComment.bind(this)) } + else { + comments + .sort((a,b) => cmp(a.id, b.id)) + .forEach(this.appendComment.bind(this)) + } }, parse: function(comment){ |
