FIX: Allow users to select "regular" categories (#16857)

Categories that had a CategoryUser record and the notification level
set to "Normal" were not selectable in any of the "Watched", "Tracked",
"Watching First Post" or "Muted" inputs. This happened because the
category seemed to be already selected in the "Normal" input, but that
does not exist (it is the default value if category is not present in
any of the other inputs).
This commit is contained in:
Bianca Nenciu 2022-05-18 17:57:57 +03:00 committed by GitHub
parent aa4b1d9c38
commit 4d1c6396c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 6 deletions

View File

@ -20,13 +20,10 @@ export default Controller.extend({
"model.watchedCategories",
"model.watchedFirstPostCategories",
"model.trackedCategories",
"model.regularCategories",
"model.mutedCategories"
)
selectedCategories(watched, watchedFirst, tracked, regular, muted) {
return []
.concat(watched, watchedFirst, tracked, regular, muted)
.filter((t) => t);
selectedCategories(watched, watchedFirst, tracked, muted) {
return [].concat(watched, watchedFirst, tracked, muted).filter((t) => t);
},
@discourseComputed

View File

@ -178,7 +178,7 @@ export default {
skip_new_user_tips: false,
enable_quoting: true,
muted_category_ids: [],
regular_category_ids: [],
regular_category_ids: [4],
tracked_category_ids: [],
watched_category_ids: [3],
watched_first_post_category_ids: [],