Get rid of Index.nodes, -1 Get.threadFromRoot call.
This commit is contained in:
parent
5581281c2e
commit
2924711db4
@ -485,12 +485,10 @@ Index =
|
|||||||
thread.collect()
|
thread.collect()
|
||||||
return
|
return
|
||||||
buildThreads: ->
|
buildThreads: ->
|
||||||
Index.nodes = []
|
threads = []
|
||||||
threads = []
|
posts = []
|
||||||
posts = []
|
|
||||||
for threadData, i in Index.liveThreadData
|
for threadData, i in Index.liveThreadData
|
||||||
threadRoot = Build.thread g.BOARD, threadData
|
threadRoot = Build.thread g.BOARD, threadData
|
||||||
Index.nodes.push threadRoot
|
|
||||||
if thread = g.BOARD.threads[threadData.no]
|
if thread = g.BOARD.threads[threadData.no]
|
||||||
thread.setPage i // Index.threadsNumPerPage
|
thread.setPage i // Index.threadsNumPerPage
|
||||||
thread.setCount 'post', threadData.replies + 1, threadData.bumplimit
|
thread.setCount 'post', threadData.replies + 1, threadData.bumplimit
|
||||||
@ -577,7 +575,7 @@ Index =
|
|||||||
when 'filecount'
|
when 'filecount'
|
||||||
sortedThreadIDs = [Index.liveThreadData...].sort((a, b) -> b.images - a.images).map (data) -> data.no
|
sortedThreadIDs = [Index.liveThreadData...].sort((a, b) -> b.images - a.images).map (data) -> data.no
|
||||||
Index.sortedThreads = sortedThreadIDs
|
Index.sortedThreads = sortedThreadIDs
|
||||||
.map (threadID) -> Get.threadFromRoot Index.nodes[Index.liveThreadIDs.indexOf threadID]
|
.map (threadID) -> g.BOARD.threads[threadID]
|
||||||
.filter (thread) -> thread.isHidden is Index.showHiddenThreads
|
.filter (thread) -> thread.isHidden is Index.showHiddenThreads
|
||||||
if Index.isSearching
|
if Index.isSearching
|
||||||
Index.sortedThreads = Index.querySearch(Index.searchInput.value) or Index.sortedThreads
|
Index.sortedThreads = Index.querySearch(Index.searchInput.value) or Index.sortedThreads
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user