partially revert ef99677f142c6b2dadb0e3f70745f0c4b14cf7d4

This commit is contained in:
ccd0 2014-09-12 22:31:54 -07:00
parent 4011f4b8a9
commit fa2ed2218a

View File

@ -385,22 +385,12 @@ Index =
sortedNodes.push nodes[Index.liveThreadIDs.indexOf(threadID)]
if Index.isSearching and nodes = Index.querySearch(Index.searchInput.value)
Index.sortedNodes = nodes
items = [
# Sticky threads
fn: (thread) -> thread.isSticky
cnd: true
, # Highlighted threads
fn: (thread) -> thread.isOnTop
cnd: Conf['Filter']
, # Non-hidden threads
fn: (thread) -> !thread.isHidden
cnd: Conf['Anchor Hidden Threads']
]
i = 0
while item = items[i++]
{fn, cnd} = item
Index.sortOnTop fn if cnd
return
# Sticky threads
Index.sortOnTop (thread) -> thread.isSticky
# Highlighted threads
Index.sortOnTop((thread) -> thread.isOnTop) if Conf['Filter']
# Non-hidden threads
Index.sortOnTop((thread) -> !thread.isHidden) if Conf['Anchor Hidden Threads']
sortOnTop: (match) ->
topNodes = []