Don't show unread line in index when last read post is OP and some posts are omitted.

This commit is contained in:
ccd0 2018-11-05 13:01:48 -08:00
parent 460bc87a5a
commit 6969f4a8cf
3 changed files with 3 additions and 1 deletions

View File

@ -64,7 +64,7 @@ UnreadIndex =
firstUnread = post
hr = UnreadIndex.hr[thread.fullID]
if firstUnread and (repliesRead or lastReadPost is thread.OP.ID)
if firstUnread and (repliesRead or (lastReadPost is thread.OP.ID and (!$(Site.selectors.summary, thread.nodes.root) or thread.ID of ExpandThread.statuses)))
if !hr
hr = UnreadIndex.hr[thread.fullID] = $.el 'hr',
className: 'unread-line'

View File

@ -54,6 +54,7 @@ SW.tinyboard =
board: 'form[name="postcontrols"]'
thread: 'div[id^="thread_"]'
threadDivider: 'div[id^="thread_"] > hr:last-of-type'
summary: '.omitted'
postContainer: '.reply' # postContainer is thread for OP
infoRoot: '.intro'
info:

View File

@ -8,6 +8,7 @@ SW.yotsuba =
board: '.board'
thread: '.thread'
threadDivider: '.board > hr'
summary: '.summary'
postContainer: '.postContainer'
sideArrows: '.sideArrows'
post: '.post'