Fix treatment of fetched deleted posts.

This commit is contained in:
ccd0 2014-12-01 20:30:09 -08:00
parent fcf4e2144a
commit 6589995e45
2 changed files with 8 additions and 5 deletions

View File

@ -95,6 +95,7 @@ Unread =
postIDs = Unread.thread.posts.keys postIDs = Unread.thread.posts.keys
for i in [Unread.readCount...postIDs.length] by 1 for i in [Unread.readCount...postIDs.length] by 1
ID = +postIDs[i] ID = +postIDs[i]
unless Unread.thread.posts[ID].isFetchedQuote
break if ID > Unread.lastReadPost break if ID > Unread.lastReadPost
Unread.posts.delete ID Unread.posts.delete ID
Unread.postsQuotingYou.delete ID Unread.postsQuotingYou.delete ID
@ -185,6 +186,7 @@ Unread =
postIDs = Unread.thread.posts.keys postIDs = Unread.thread.posts.keys
for i in [Unread.readCount...postIDs.length] by 1 for i in [Unread.readCount...postIDs.length] by 1
ID = +postIDs[i] ID = +postIDs[i]
unless Unread.thread.posts[ID].isFetchedQuote
break if Unread.posts.has ID break if Unread.posts.has ID
Unread.lastReadPost = ID Unread.lastReadPost = ID
Unread.readCount++ Unread.readCount++

View File

@ -108,6 +108,7 @@ QuoteThreading =
Unread.order = new RandomAccessList Unread.order = new RandomAccessList
QuoteThreading.inserted = {} QuoteThreading.inserted = {}
posts.forEach (post) -> posts.forEach (post) ->
return if post.isFetchedQuote
Unread.order.push post Unread.order.push post
nodes.push post.nodes.root if post.isReply nodes.push post.nodes.root if post.isReply
if QuoteThreading.children[post.fullID] if QuoteThreading.children[post.fullID]