From 279ca7c208f6f645ef9a2c91e8a9ee263652d644 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 13 Dec 2017 00:22:20 +0100 Subject: sort threads --- public/assets/js/lib/views/index/threadbox.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'public/assets/js/lib/views/index/threadbox.js') diff --git a/public/assets/js/lib/views/index/threadbox.js b/public/assets/js/lib/views/index/threadbox.js index f3c4e0f..83ac269 100644 --- a/public/assets/js/lib/views/index/threadbox.js +++ b/public/assets/js/lib/views/index/threadbox.js @@ -35,7 +35,9 @@ var ThreadBox = View.extend({ }) Object.keys(keywords).sort().forEach((keyword) => { this.appendKeyword({ keyword }) - this.appendThreads(keywords[keyword]) + this.appendThreads(keywords[keyword].sort( (a,b) => { + return b.lastmodified - a.lastmodified + })) }) } if (is_mobile || window.innerWidth < 700) { -- cgit v1.2.3-70-g09d2