Make Scroll to Last Read Post operate in index if Unread Line in Index enabled.

This commit is contained in:
ccd0 2018-11-03 03:51:28 -07:00
parent ce5d40cfb7
commit 50dad6006e

View File

@ -34,7 +34,10 @@ UnreadIndex =
return if e.target is Index.root # onIndexRefresh handles this case
thread = Get.threadFromNode e.target
return if !thread or thread.nodes.root isnt e.target
wasVisible = !!UnreadIndex.hr[thread.fullID]?.parentNode
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: ->
g.threads.forEach (thread) ->