From 7f64cd9c268016a9f2ee3c9fd2280f9fe699e9d8 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sun, 2 Oct 2016 00:18:29 -0700 Subject: [PATCH] Move Index.buildThreads call into buildStructure / buildCatalog. --- src/General/Index.coffee | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/General/Index.coffee b/src/General/Index.coffee index d7dd47d8f..aa63b843e 100644 --- a/src/General/Index.coffee +++ b/src/General/Index.coffee @@ -160,8 +160,7 @@ Index = return Index.endNotice() if pageNum > Index.pagesNum threadIDs = Index.threadsOnPage pageNum - threads = Index.buildThreads threadIDs - Index.buildStructure threads + Index.buildStructure threadIDs endNotice: do -> notify = false @@ -767,21 +766,21 @@ Index = threadIDs = Index.sortedThreadIDs.filter (ID) -> !Index.isHidden(ID) isnt Index.showHiddenThreads else threadIDs = Index.threadsOnPage Index.currentPage - threads = Index.buildThreads threadIDs delete Index.pageNum $.rmAll Index.root $.rmAll Header.hover if Conf['Index Mode'] is 'catalog' - Index.buildCatalog threads + Index.buildCatalog threadIDs else - Index.buildStructure threads + Index.buildStructure threadIDs threadsOnPage: (pageNum) -> nodesPerPage = Index.threadsNumPerPage offset = nodesPerPage * (pageNum - 1) Index.sortedThreadIDs[offset ... offset + nodesPerPage] - buildStructure: (threads) -> + buildStructure: (threadIDs) -> + threads = Index.buildThreads threadIDs Index.buildReplies threads if Conf['Show Replies'] nodes = [] for thread in threads @@ -794,7 +793,8 @@ Index = if doc.contains Index.root $.event 'PostsInserted' - buildCatalog: (threads) -> + buildCatalog: (threadIDs) -> + threads = Index.buildThreads threadIDs Index.buildCatalogViews threads Index.sizeCatalogViews threads Index.buildCatalogReplies threads if Conf['Show Replies'] and Conf['Catalog Hover Expand']