Fix treatment of fetched deleted posts.
This commit is contained in:
parent
fcf4e2144a
commit
6589995e45
@ -95,9 +95,10 @@ 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]
|
||||||
break if ID > Unread.lastReadPost
|
unless Unread.thread.posts[ID].isFetchedQuote
|
||||||
Unread.posts.delete ID
|
break if ID > Unread.lastReadPost
|
||||||
Unread.postsQuotingYou.delete ID
|
Unread.posts.delete ID
|
||||||
|
Unread.postsQuotingYou.delete ID
|
||||||
Unread.readCount++
|
Unread.readCount++
|
||||||
|
|
||||||
Unread.updatePosition()
|
Unread.updatePosition()
|
||||||
@ -185,8 +186,9 @@ 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]
|
||||||
break if Unread.posts.has ID
|
unless Unread.thread.posts[ID].isFetchedQuote
|
||||||
Unread.lastReadPost = ID
|
break if Unread.posts.has ID
|
||||||
|
Unread.lastReadPost = ID
|
||||||
Unread.readCount++
|
Unread.readCount++
|
||||||
return if Unread.thread.isDead and !Unread.thread.isArchived
|
return if Unread.thread.isDead and !Unread.thread.isArchived
|
||||||
Unread.db.forceSync()
|
Unread.db.forceSync()
|
||||||
|
|||||||
@ -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]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user