mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 04:08:41 +08:00
FEATURE: Add last visit indication to topic view page. (#13471)
This PR also removes grey old unread bubble from the topic badges by dropping `TopicUser#highest_seen_post_number`.
This commit is contained in:

committed by
GitHub

parent
0f688f45bd
commit
37b8ce79c9
@ -72,7 +72,7 @@ class TopicsBulkAction
|
||||
highest_number_source_column = @user.staff? ? 'highest_staff_post_number' : 'highest_post_number'
|
||||
sql = <<~SQL
|
||||
UPDATE topic_users tu
|
||||
SET highest_seen_post_number = t.#{highest_number_source_column} , last_read_post_number = t.#{highest_number_source_column}
|
||||
SET last_read_post_number = t.#{highest_number_source_column}
|
||||
FROM topics t
|
||||
WHERE t.id = tu.topic_id AND tu.user_id = :user_id AND t.id IN (:topic_ids)
|
||||
SQL
|
||||
|
Reference in New Issue
Block a user