summaryrefslogtreecommitdiff
path: root/public/assets/js/lib/views/index/threadbox.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2017-12-13 00:22:20 +0100
committerJules Laplace <julescarbon@gmail.com>2017-12-13 00:22:20 +0100
commit279ca7c208f6f645ef9a2c91e8a9ee263652d644 (patch)
tree6e64b1308efa48b080ebaaa206d76d785906fd56 /public/assets/js/lib/views/index/threadbox.js
parent1d38c91fbc8aed5b909c0ce9f60014b219fe792a (diff)
sort threads
Diffstat (limited to 'public/assets/js/lib/views/index/threadbox.js')
-rw-r--r--public/assets/js/lib/views/index/threadbox.js4
1 files changed, 3 insertions, 1 deletions
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) {