From 50dad6006e63d21db18ea5bb0880c260d9a24ed0 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 3 Nov 2018 03:51:28 -0700 Subject: [PATCH] Make `Scroll to Last Read Post` operate in index if `Unread Line in Index` enabled. --- src/Monitoring/UnreadIndex.coffee | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Monitoring/UnreadIndex.coffee b/src/Monitoring/UnreadIndex.coffee index b890b68e5..5a97d32d2 100644 --- a/src/Monitoring/UnreadIndex.coffee +++ b/src/Monitoring/UnreadIndex.coffee @@ -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) ->