{{category-group categories=model.mutedCategories blacklist=selectedCategories}}
diff --git a/app/assets/stylesheets/common/base/user.scss b/app/assets/stylesheets/common/base/user.scss
index f24f54400d..c1870eb958 100644
--- a/app/assets/stylesheets/common/base/user.scss
+++ b/app/assets/stylesheets/common/base/user.scss
@@ -288,3 +288,7 @@ and (max-width : 600px) {
border: none;
}
}
+
+.user-preferences .watching-first-post.fa-dot-circle-o {
+ color: dark-light-choose(scale-color($primary, $lightness: 50%), scale-color($secondary, $lightness: 50%));
+}
diff --git a/app/serializers/user_serializer.rb b/app/serializers/user_serializer.rb
index 3b59d49dcd..475b8f751c 100644
--- a/app/serializers/user_serializer.rb
+++ b/app/serializers/user_serializer.rb
@@ -88,6 +88,7 @@ class UserSerializer < BasicUserSerializer
:muted_tags,
:tracked_category_ids,
:watched_category_ids,
+ :watched_first_post_category_ids,
:private_messages_stats,
:system_avatar_upload_id,
:system_avatar_template,
@@ -273,6 +274,10 @@ class UserSerializer < BasicUserSerializer
CategoryUser.lookup(object, :watching).pluck(:category_id)
end
+ def watched_first_post_category_ids
+ CategoryUser.lookup(object, :watching_first_post).pluck(:category_id)
+ end
+
def muted_usernames
MutedUser.where(user_id: object.id).joins(:muted_user).pluck(:username)
end
diff --git a/app/services/user_updater.rb b/app/services/user_updater.rb
index d632d8fa11..76683014e1 100644
--- a/app/services/user_updater.rb
+++ b/app/services/user_updater.rb
@@ -1,6 +1,7 @@
class UserUpdater
CATEGORY_IDS = {
+ watched_first_post_category_ids: :watching_first_post,
watched_category_ids: :watching,
tracked_category_ids: :tracking,
muted_category_ids: :muted
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index 8d61054579..cae4000993 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -550,6 +550,8 @@ en:
watched_categories_instructions: "You will automatically watch all topics in these categories. You will be notified of all new posts and topics, and a count of new posts will also appear next to the topic."
tracked_categories: "Tracked"
tracked_categories_instructions: "You will automatically track all new topics in these categories. A count of new posts will appear next to the topic."
+ watched_first_post_categories: "Watching First Post Only"
+ watched_first_post_categories_instructions: "You will be notified of the first post in each new topic in these categories."
muted_categories: "Muted"
muted_categories_instructions: "You will not be notified of anything about new topics in these categories, and they will not appear in latest."
delete_account: "Delete My Account"