Merge branch 'longreply'

This commit is contained in:
ccd0 2016-03-12 16:51:29 -08:00
commit 382922d934
2 changed files with 9 additions and 0 deletions

View File

@ -639,6 +639,14 @@ Index =
b = num[num.length - 1] if (num = b.last_replies)
b.no - a.no
).map (post) -> post.no
when 'lastlong'
lastlong = (thread) ->
for r, i in (thread.last_replies or []) by -1
return r if r.com and Build.parseComment(r.com).replace(/[^a-z]/ig, '').length >= 100
thread
[liveThreadData...].sort((a, b) ->
lastlong(b).no - lastlong(a).no
).map (post) -> post.no
when 'bump' then liveThreadIDs
when 'birth' then [liveThreadIDs... ].sort (a, b) -> b - a
when 'replycount' then [liveThreadData...].sort((a, b) -> b.replies - a.replies).map (post) -> post.no

View File

@ -17,6 +17,7 @@
<option disabled>Index Sort</option>
<option value="bump">Bump order</option>
<option value="lastreply">Last reply</option>
<option value="lastlong">Last long reply</option>
<option value="birth">Creation date</option>
<option value="replycount">Reply count</option>
<option value="filecount">File count</option>