From 2924711db415c22e8078b6bcd0c95bb7f17d93d1 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Thu, 27 Feb 2014 17:42:52 +0100 Subject: [PATCH] Get rid of Index.nodes, -1 Get.threadFromRoot call. --- src/General/Index.coffee | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/General/Index.coffee b/src/General/Index.coffee index 0e7b87a2f..562ebc2b9 100644 --- a/src/General/Index.coffee +++ b/src/General/Index.coffee @@ -485,12 +485,10 @@ Index = thread.collect() return buildThreads: -> - Index.nodes = [] - threads = [] - posts = [] + threads = [] + posts = [] for threadData, i in Index.liveThreadData threadRoot = Build.thread g.BOARD, threadData - Index.nodes.push threadRoot if thread = g.BOARD.threads[threadData.no] thread.setPage i // Index.threadsNumPerPage thread.setCount 'post', threadData.replies + 1, threadData.bumplimit @@ -577,7 +575,7 @@ Index = when 'filecount' sortedThreadIDs = [Index.liveThreadData...].sort((a, b) -> b.images - a.images).map (data) -> data.no 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 if Index.isSearching Index.sortedThreads = Index.querySearch(Index.searchInput.value) or Index.sortedThreads