diff --git a/src/General/Index.coffee b/src/General/Index.coffee index a0488bf3e..e2ccf6e37 100644 --- a/src/General/Index.coffee +++ b/src/General/Index.coffee @@ -663,6 +663,7 @@ Index = Index.liveThreadDict = {} Index.threadPosition = {} Index.parsedThreads = {} + Index.replyData = {} for data, i in Index.liveThreadData Index.liveThreadDict[data.no] = data Index.threadPosition[data.no] = i @@ -670,6 +671,9 @@ Index = obj.filterResults = results = Filter.test obj obj.isOnTop = results.top obj.isHidden = results.hide or ThreadHiding.isHidden(obj.boardID, obj.threadID) + if data.last_replies + for reply in data.last_replies + Index.replyData["#{g.BOARD}.#{reply.no}"] = reply if Index.liveThreadData[0] Build.spoilerRange[g.BOARD.ID] = Index.liveThreadData[0].custom_spoiler g.BOARD.threads.forEach (thread) -> diff --git a/src/classes/Fetcher.coffee b/src/classes/Fetcher.coffee index 135a0374c..f67adf4b2 100644 --- a/src/classes/Fetcher.coffee +++ b/src/classes/Fetcher.coffee @@ -4,6 +4,16 @@ class Fetcher @insert post return + # 4chan X catalog data + if (post = Index.replyData?["#{@boardID}.#{@postID}"]) + board = g.boards[@boardID] + thread = g.threads["#{@boardID}.#{@threadID}"] + post = new Post Build.postFromObject(post, @boardID), thread, board + post.isFetchedQuote = true + Main.callbackNodes 'Post', [post] + @insert post + return + @root.textContent = "Loading post No.#{@postID}..." if @threadID $.cache "//a.4cdn.org/#{@boardID}/thread/#{@threadID}.json", (e, isCached) =>