Fix Unread.scroll conflict with Fappe Tyme.
This commit is contained in:
parent
33d802d264
commit
41755d1b8e
@ -45,13 +45,14 @@ Unread =
|
|||||||
return if (hash = location.hash.match /\d+/) and hash[0] of Unread.thread.posts
|
return if (hash = location.hash.match /\d+/) and hash[0] of Unread.thread.posts
|
||||||
|
|
||||||
# Scroll to the last non-hidden non-deleted read post.
|
# Scroll to the last non-hidden non-deleted read post.
|
||||||
post = null
|
|
||||||
{posts} = Unread.thread
|
{posts} = Unread.thread
|
||||||
for ID in posts.keys
|
for ID in posts.keys by -1
|
||||||
break if +ID > Unread.lastReadPost
|
continue if +ID > Unread.lastReadPost
|
||||||
post = posts[ID] unless posts[ID].isHidden
|
{root} = posts[ID].nodes
|
||||||
if post
|
if root.getBoundingClientRect().height
|
||||||
Header.scrollToIfNeeded post.nodes.root, true
|
Header.scrollToIfNeeded root, true
|
||||||
|
break
|
||||||
|
return
|
||||||
|
|
||||||
sync: ->
|
sync: ->
|
||||||
return unless Unread.lastReadPost?
|
return unless Unread.lastReadPost?
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user