mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 13:03:45 +08:00
5108cf8ddf
Make sure the topic_user.bookmarked column is set correctly when user bookmarks/unbookmarks any post in a topic. For example, you bookmarked a post in the topic that was not the OP, the bookmark icon in the topic list would not be shown. Same if deleting a bookmark for the last bookmarked post in a topic, the bookmark icon in the topic list would not be removed. Previously this was only setting it to true if bookmarking the OP/topic, which was not correct -- we want to show the icon on the topic list if any post is bookmarked. Also set to false if unbookmarking the last bookmarked post in the topic. Also in this PR is a migration to correct any out of sync topic_user.bookmarked columns, based on the new logic. |
||
---|---|---|
.. | ||
components | ||
fabricators | ||
fixtures | ||
helpers | ||
import_export | ||
initializers | ||
integration | ||
integrity | ||
jobs | ||
lib | ||
mailers | ||
models | ||
multisite | ||
requests | ||
serializers | ||
services | ||
support | ||
tasks | ||
views/omniauth_callbacks | ||
rails_helper.rb | ||
swagger_helper.rb |