Make Scroll to Last Read Post operate in index if Unread Line in Index enabled.
This commit is contained in:
parent
ce5d40cfb7
commit
50dad6006e
@ -34,7 +34,10 @@ UnreadIndex =
|
|||||||
return if e.target is Index.root # onIndexRefresh handles this case
|
return if e.target is Index.root # onIndexRefresh handles this case
|
||||||
thread = Get.threadFromNode e.target
|
thread = Get.threadFromNode e.target
|
||||||
return if !thread or thread.nodes.root isnt e.target
|
return if !thread or thread.nodes.root isnt e.target
|
||||||
|
wasVisible = !!UnreadIndex.hr[thread.fullID]?.parentNode
|
||||||
UnreadIndex.update thread
|
UnreadIndex.update thread
|
||||||
|
if Conf['Scroll to Last Read Post'] and !wasVisible and !!UnreadIndex.hr[thread.fullID]?.parentNode
|
||||||
|
Header.scrollToIfNeeded UnreadIndex.hr[thread.fullID], true
|
||||||
|
|
||||||
sync: ->
|
sync: ->
|
||||||
g.threads.forEach (thread) ->
|
g.threads.forEach (thread) ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user