Pull Index references out of Build.catalogThread.
This commit is contained in:
parent
378d2be2da
commit
3997cf354d
@ -181,9 +181,8 @@ Build =
|
|||||||
$.add root, summary
|
$.add root, summary
|
||||||
root
|
root
|
||||||
|
|
||||||
catalogThread: (thread) ->
|
catalogThread: (thread, data, pageCount) ->
|
||||||
{staticPath, gifIcon} = Build
|
{staticPath, gifIcon} = Build
|
||||||
data = Index.liveThreadDict[thread.ID]
|
|
||||||
|
|
||||||
if data.spoiler and !Conf['Reveal Spoiler Thumbnails']
|
if data.spoiler and !Conf['Reveal Spoiler Thumbnails']
|
||||||
src = "#{staticPath}spoiler"
|
src = "#{staticPath}spoiler"
|
||||||
@ -203,7 +202,6 @@ Build =
|
|||||||
|
|
||||||
postCount = data.replies + 1
|
postCount = data.replies + 1
|
||||||
fileCount = data.images + !!data.ext
|
fileCount = data.images + !!data.ext
|
||||||
pageCount = Index.liveThreadIDs.indexOf(thread.ID) // Index.threadsNumPerPage + 1
|
|
||||||
|
|
||||||
root = $.el 'div',
|
root = $.el 'div',
|
||||||
className: 'catalog-thread post' # post added to make 4chan postInfo CSS work
|
className: 'catalog-thread post' # post added to make 4chan postInfo CSS work
|
||||||
|
|||||||
@ -632,7 +632,9 @@ Index =
|
|||||||
buildCatalogViews: (threads) ->
|
buildCatalogViews: (threads) ->
|
||||||
catalogThreads = []
|
catalogThreads = []
|
||||||
for thread in threads when !thread.catalogView
|
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
|
Main.callbackNodes 'CatalogThread', catalogThreads
|
||||||
threads.map (thread) -> thread.catalogView.nodes.root
|
threads.map (thread) -> thread.catalogView.nodes.root
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user