When expanding threads, rebuild posts originally fetched for quote previews.
Fixes lack of post hiding buttons etc.
This commit is contained in:
parent
52a5d1bd45
commit
184141a5e0
@ -89,6 +89,10 @@ class Post
|
||||
@isHidden = false
|
||||
|
||||
@clones = []
|
||||
if g.posts[@fullID]
|
||||
@isRebuilt = true
|
||||
@clones = g.posts[@fullID].clones
|
||||
clone.origin = @ for clone in @clones
|
||||
g.posts.push @fullID, thread.posts.push @, board.posts.push @, @
|
||||
@kill() if that.isArchived
|
||||
|
||||
|
||||
@ -157,7 +157,7 @@ Embedding =
|
||||
link.textContent = text
|
||||
for post2 in post.clones
|
||||
for link2 in $$ 'a.linkify', post2.nodes.comment when link2.href is link.href
|
||||
link2.dataset.original = link2.textContent
|
||||
link2.dataset.original ?= link2.textContent
|
||||
link2.textContent = text
|
||||
return
|
||||
|
||||
|
||||
@ -90,7 +90,7 @@ ExpandThread =
|
||||
filesCount = 0
|
||||
for postData in req.response.posts
|
||||
continue if postData.no is thread.ID
|
||||
if post = thread.posts[postData.no]
|
||||
if (post = thread.posts[postData.no]) and not post.isFetchedQuote
|
||||
filesCount++ if 'file' of post
|
||||
postsRoot.push post.nodes.root
|
||||
continue
|
||||
|
||||
@ -21,7 +21,7 @@ QuoteBacklink =
|
||||
name: 'Quote Backlinking Part 2'
|
||||
cb: @secondNode
|
||||
firstNode: ->
|
||||
return if @isClone or !@quotes.length
|
||||
return if @isClone or !@quotes.length or @isRebuilt
|
||||
markYours = Conf['Quick Reply'] and Conf['Mark Quotes of You'] and QR.db.get {boardID: @board.ID, threadID: @thread.ID, postID: @ID}
|
||||
a = $.el 'a',
|
||||
href: Build.postURL @board.ID, @thread.ID, @ID
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user