FEATURE: add regular_categories field in site setting & user option. (#10477)

Like "default watching" and "default tracking" categories option now the "regular" categories support is added. It will be useful for sites that are muted by default. The user option will be displayed only if `mute_all_categories_by_default` site setting is enabled.
This commit is contained in:
Vinoth Kannan
2020-08-20 00:35:04 +05:30
committed by GitHub
parent a3c0d4a8b5
commit 8348a41124
19 changed files with 109 additions and 27 deletions

View File

@@ -891,7 +891,8 @@ class TopicQuery
category_ids = [
SiteSetting.default_categories_watching.split("|"),
SiteSetting.default_categories_tracking.split("|"),
SiteSetting.default_categories_watching_first_post.split("|")
SiteSetting.default_categories_watching_first_post.split("|"),
SiteSetting.default_categories_regular.split("|")
].flatten.map(&:to_i)
category_ids << category_id if category_id.present? && category_ids.exclude?(category_id)