Scrolling to post hidden by Reply Pruning unhides post. This includes 'Scroll to Last Read Post'.
This commit is contained in:
parent
0065037bdc
commit
0e8fade646
@ -439,7 +439,9 @@ Header =
|
||||
return if e.state
|
||||
history.replaceState {}, '' unless history.state
|
||||
|
||||
if (hash = location.hash[1..]) and (el = $.id hash)
|
||||
if (hash = location.hash[1..])
|
||||
ReplyPruning.showIfHidden hash
|
||||
if (el = $.id hash)
|
||||
$.queueTask -> Header.scrollTo el
|
||||
|
||||
scrollTo: (root, down, needed) ->
|
||||
|
||||
@ -51,6 +51,11 @@ ReplyPruning =
|
||||
$.event 'change', null, other
|
||||
$.cb.checked.call @
|
||||
|
||||
showIfHidden: (id) ->
|
||||
if ReplyPruning.container?.getElementById id
|
||||
ReplyPruning.inputs.enabled.checked = false
|
||||
$.event 'change', null, ReplyPruning.inputs.enabled
|
||||
|
||||
node: ->
|
||||
ReplyPruning.thread = @
|
||||
|
||||
|
||||
@ -63,9 +63,9 @@ Unread =
|
||||
|
||||
ready: ->
|
||||
Unread.setLine true
|
||||
Unread.scroll() if Conf['Remember Last Read Post'] and Conf['Scroll to Last Read Post']
|
||||
Unread.read()
|
||||
Unread.update()
|
||||
Unread.scroll() if Conf['Remember Last Read Post'] and Conf['Scroll to Last Read Post']
|
||||
$.on d, 'scroll visibilitychange', Unread.read
|
||||
$.on d, 'visibilitychange', Unread.setLine if Conf['Unread Line']
|
||||
|
||||
@ -76,6 +76,8 @@ Unread =
|
||||
# Let the header's onload callback handle it.
|
||||
return if (hash = location.hash.match /\d+/) and hash[0] of Unread.thread.posts
|
||||
|
||||
ReplyPruning.showIfHidden Unread.position?.data.nodes.root.id
|
||||
|
||||
position = Unread.positionPrev()
|
||||
while position
|
||||
{root} = position.data.nodes
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user