mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
FIX: unread and new count not removing deleted topics on the fly
FIX: unread PMs interfering with unread count
This commit is contained in:
parent
b7171154da
commit
fbdd9c0034
3 changed files with 77 additions and 9 deletions
|
@ -65,6 +65,7 @@ class PostDestroyer
|
|||
def staff_recovered
|
||||
@post.recover!
|
||||
@post.publish_change_to_clients! :recovered
|
||||
TopicTrackingState.publish_recover(@post.topic) if @post.topic && @post.post_number == 1
|
||||
end
|
||||
|
||||
# When a post is properly deleted. Well, it's still soft deleted, but it will no longer
|
||||
|
@ -96,6 +97,7 @@ class PostDestroyer
|
|||
|
||||
feature_users_in_the_topic if @post.topic
|
||||
@post.publish_change_to_clients! :deleted if @post.topic
|
||||
TopicTrackingState.publish_delete(@post.topic) if @post.topic && @post.post_number == 1
|
||||
end
|
||||
|
||||
# When a user 'deletes' their own post. We just change the text.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue