Index should also rebuild posts from quote fetching.
As was done for thread expansion in 184141a5e0c5c1da2ac85c8d0c550bfb24b02577.
This commit is contained in:
parent
a5f4915e51
commit
ecead5f7e8
@ -4,7 +4,7 @@ ThreadHiding =
|
|||||||
@db = new DataBoard 'hiddenThreads'
|
@db = new DataBoard 'hiddenThreads'
|
||||||
return @catalogWatch() if g.VIEW is 'catalog'
|
return @catalogWatch() if g.VIEW is 'catalog'
|
||||||
@catalogSet g.BOARD
|
@catalogSet g.BOARD
|
||||||
Thread.callbacks.push
|
Post.callbacks.push
|
||||||
name: 'Thread Hiding'
|
name: 'Thread Hiding'
|
||||||
cb: @node
|
cb: @node
|
||||||
|
|
||||||
@ -38,10 +38,13 @@ ThreadHiding =
|
|||||||
ThreadHiding.hiddenThreads = hiddenThreads2
|
ThreadHiding.hiddenThreads = hiddenThreads2
|
||||||
|
|
||||||
node: ->
|
node: ->
|
||||||
|
return if @isReply or @isClone or @isFetchedQuote
|
||||||
|
|
||||||
if data = ThreadHiding.db.get {boardID: @board.ID, threadID: @ID}
|
if data = ThreadHiding.db.get {boardID: @board.ID, threadID: @ID}
|
||||||
ThreadHiding.hide @, data.makeStub
|
ThreadHiding.hide @thread, data.makeStub
|
||||||
|
|
||||||
return unless Conf['Thread Hiding Buttons']
|
return unless Conf['Thread Hiding Buttons']
|
||||||
$.prepend @OP.nodes.root, ThreadHiding.makeButton @, 'hide'
|
$.prepend @nodes.root, ThreadHiding.makeButton(@thread, 'hide')
|
||||||
|
|
||||||
onIndexBuild: (nodes) ->
|
onIndexBuild: (nodes) ->
|
||||||
for root in nodes
|
for root in nodes
|
||||||
|
|||||||
@ -276,7 +276,10 @@ Build =
|
|||||||
thread: (board, data, full) ->
|
thread: (board, data, full) ->
|
||||||
Build.spoilerRange[board] = data.custom_spoiler
|
Build.spoilerRange[board] = data.custom_spoiler
|
||||||
|
|
||||||
if (OP = board.posts[data.no]) and root = OP.nodes.root.parentNode
|
if OP = board.posts[data.no]
|
||||||
|
OP = null if OP.isFetchedQuote
|
||||||
|
|
||||||
|
if OP and (root = OP.nodes.root.parentNode)
|
||||||
$.rmAll root
|
$.rmAll root
|
||||||
else
|
else
|
||||||
root = $.el 'div',
|
root = $.el 'div',
|
||||||
|
|||||||
@ -517,7 +517,7 @@ Index =
|
|||||||
thread = new Thread threadData.no, g.BOARD
|
thread = new Thread threadData.no, g.BOARD
|
||||||
threads.push thread
|
threads.push thread
|
||||||
Index.nodes.push threadRoot
|
Index.nodes.push threadRoot
|
||||||
unless thread.ID of thread.posts
|
unless thread.OP and not thread.OP.isFetchedQuote
|
||||||
posts.push new Post $('.opContainer', threadRoot), thread, g.BOARD
|
posts.push new Post $('.opContainer', threadRoot), thread, g.BOARD
|
||||||
thread.setPage i // Index.threadsNumPerPage + 1
|
thread.setPage i // Index.threadsNumPerPage + 1
|
||||||
catch err
|
catch err
|
||||||
@ -543,7 +543,7 @@ Index =
|
|||||||
continue unless lastReplies = Index.liveThreadData[i].last_replies
|
continue unless lastReplies = Index.liveThreadData[i].last_replies
|
||||||
nodes = []
|
nodes = []
|
||||||
for data in lastReplies
|
for data in lastReplies
|
||||||
if post = thread.posts[data.no]
|
if (post = thread.posts[data.no]) and not post.isFetchedQuote
|
||||||
nodes.push post.nodes.root
|
nodes.push post.nodes.root
|
||||||
continue
|
continue
|
||||||
nodes.push node = Build.postFromObject data, thread.board.ID
|
nodes.push node = Build.postFromObject data, thread.board.ID
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user