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
|
@isHidden = false
|
||||||
|
|
||||||
@clones = []
|
@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 @, @
|
g.posts.push @fullID, thread.posts.push @, board.posts.push @, @
|
||||||
@kill() if that.isArchived
|
@kill() if that.isArchived
|
||||||
|
|
||||||
|
|||||||
@ -157,7 +157,7 @@ Embedding =
|
|||||||
link.textContent = text
|
link.textContent = text
|
||||||
for post2 in post.clones
|
for post2 in post.clones
|
||||||
for link2 in $$ 'a.linkify', post2.nodes.comment when link2.href is link.href
|
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
|
link2.textContent = text
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@ -90,7 +90,7 @@ ExpandThread =
|
|||||||
filesCount = 0
|
filesCount = 0
|
||||||
for postData in req.response.posts
|
for postData in req.response.posts
|
||||||
continue if postData.no is thread.ID
|
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
|
filesCount++ if 'file' of post
|
||||||
postsRoot.push post.nodes.root
|
postsRoot.push post.nodes.root
|
||||||
continue
|
continue
|
||||||
|
|||||||
@ -21,7 +21,7 @@ QuoteBacklink =
|
|||||||
name: 'Quote Backlinking Part 2'
|
name: 'Quote Backlinking Part 2'
|
||||||
cb: @secondNode
|
cb: @secondNode
|
||||||
firstNode: ->
|
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}
|
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',
|
a = $.el 'a',
|
||||||
href: Build.postURL @board.ID, @thread.ID, @ID
|
href: Build.postURL @board.ID, @thread.ID, @ID
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user