FEATURE: improved tag and category watching and tracking

- present tags watched on the user prefs page
- automatically watch or unwatch old topics based on watch status

New watching and tracking logic takes care of handling old topics
(either with or without read state)

When you watch a topic you now watch historically

Also removes confusing warnings from user.
This commit is contained in:
Sam
2016-07-08 12:58:18 +10:00
parent 58c2389a7b
commit 4161ee210a
19 changed files with 583 additions and 224 deletions

View File

@@ -6,6 +6,12 @@ class UserUpdater
muted_category_ids: :muted
}
TAG_NAMES = {
watched_tags: :watching,
tracked_tags: :tracking,
muted_tags: :muted
}
OPTION_ATTR = [
:email_always,
:mailing_list_mode,
@@ -55,6 +61,10 @@ class UserUpdater
end
end
TAG_NAMES.each do |attribute, level|
TagUser.batch_set(user, level, attributes[attribute])
end
save_options = false