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,9 +95,10 @@ Unread =
postIDs = Unread.thread.posts.keys
for i in [Unread.readCount...postIDs.length] by 1
ID = +postIDs[i]
break if ID > Unread.lastReadPost
Unread.posts.delete ID
Unread.postsQuotingYou.delete ID
unless Unread.thread.posts[ID].isFetchedQuote
break if ID > Unread.lastReadPost
Unread.posts.delete ID
Unread.postsQuotingYou.delete ID
Unread.readCount++
Unread.updatePosition()
@ -185,8 +186,9 @@ Unread =
postIDs = Unread.thread.posts.keys
for i in [Unread.readCount...postIDs.length] by 1
ID = +postIDs[i]
break if Unread.posts.has ID
Unread.lastReadPost = ID
unless Unread.thread.posts[ID].isFetchedQuote
break if Unread.posts.has ID
Unread.lastReadPost = ID
Unread.readCount++
return if Unread.thread.isDead and !Unread.thread.isArchived
Unread.db.forceSync()

View File

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