diff --git a/src/General/Build.coffee b/src/General/Build.coffee index 521a8bb42..39b796a51 100644 --- a/src/General/Build.coffee +++ b/src/General/Build.coffee @@ -181,9 +181,8 @@ Build = $.add root, summary root - catalogThread: (thread) -> + catalogThread: (thread, data, pageCount) -> {staticPath, gifIcon} = Build - data = Index.liveThreadDict[thread.ID] if data.spoiler and !Conf['Reveal Spoiler Thumbnails'] src = "#{staticPath}spoiler" @@ -203,7 +202,6 @@ Build = postCount = data.replies + 1 fileCount = data.images + !!data.ext - pageCount = Index.liveThreadIDs.indexOf(thread.ID) // Index.threadsNumPerPage + 1 root = $.el 'div', className: 'catalog-thread post' # post added to make 4chan postInfo CSS work diff --git a/src/General/Index.coffee b/src/General/Index.coffee index 79632ee45..cd455cbd7 100644 --- a/src/General/Index.coffee +++ b/src/General/Index.coffee @@ -632,7 +632,9 @@ Index = buildCatalogViews: (threads) -> catalogThreads = [] for thread in threads when !thread.catalogView - catalogThreads.push new CatalogThread Build.catalogThread(thread), thread + i = Index.liveThreadIDs.indexOf thread.ID + root = Build.catalogThread thread, Index.liveThreadData[i], i // Index.threadsNumPerPage + 1 + catalogThreads.push new CatalogThread root, thread Main.callbackNodes 'CatalogThread', catalogThreads threads.map (thread) -> thread.catalogView.nodes.root