diff --git a/src/General/Build.coffee b/src/General/Build.coffee index 1d22c6696..521a8bb42 100644 --- a/src/General/Build.coffee +++ b/src/General/Build.coffee @@ -162,22 +162,22 @@ Build = textContent: Build.summaryText '', posts, files href: "/#{boardID}/thread/#{threadID}" - thread: (board, data, OP) -> - if (root = OP.nodes.root.parentNode) + thread: (thread, data) -> + if (root = thread.OP.nodes.root.parentNode) $.rmAll root else root = $.el 'div', className: 'thread' id: "t#{data.no}" $.add root, Build.hat.cloneNode(false) if Build.hat - $.add root, OP.nodes.root + $.add root, thread.OP.nodes.root if data.omitted_posts or !Conf['Show Replies'] and data.replies [posts, files] = if Conf['Show Replies'] # XXX data.omitted_images is not accurate. [data.omitted_posts, data.images - data.last_replies.filter((data) -> !!data.ext).length] else [data.replies, data.images] - summary = Build.summary board.ID, data.no, posts, files + summary = Build.summary thread.board.ID, data.no, posts, files $.add root, summary root diff --git a/src/General/Index.coffee b/src/General/Index.coffee index 5abf1ae4a..79632ee45 100644 --- a/src/General/Index.coffee +++ b/src/General/Index.coffee @@ -592,7 +592,7 @@ Index = posts.push OP thread.setPage i // Index.threadsNumPerPage + 1 - Index.nodes[thread.ID] = Build.thread g.BOARD, threadData, OP + Index.nodes[thread.ID] = Build.thread thread, threadData catch err # Skip posts that we failed to parse. errors = [] unless errors