From 5cd2f7d4f985e97580617c1bafc830054eea73da Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 9 Apr 2018 15:28:10 +0200 Subject: sort by id normally, except for the old threads where the order is messed up --- public/assets/js/lib/views/details/comments.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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){ -- cgit v1.2.3-70-g09d2