diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-09-20 17:02:15 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-09-20 17:02:15 -0500 |
commit | 583fd2c1fd4323d0b9532fa0f9fe88669ced6ebc (patch) | |
tree | bc4ef24d82bc982f5b512c6bf8bf0fdfbec6d1b6 /app/lib | |
parent | 69473c4fbec7775cae2badfeb16990aa0e9e85a4 (diff) |
[Privacy, UI] Split privacy-related preferences into Privacy options section; add option to disable RSS
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/user_settings_decorator.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/lib/user_settings_decorator.rb b/app/lib/user_settings_decorator.rb index 386b1dcf6..a58a17166 100644 --- a/app/lib/user_settings_decorator.rb +++ b/app/lib/user_settings_decorator.rb @@ -63,6 +63,7 @@ class UserSettingsDecorator user.settings['filter_to_unknown'] = filter_to_unknown_preference if change?('setting_filter_to_unknown') user.settings['filter_from_unknown'] = filter_from_unknown_preference if change?('setting_filter_from_unknown') user.settings['unpublish_on_delete'] = unpublish_on_delete_preference if change?('setting_unpublish_on_delete') + user.settings['rss_disabled'] = rss_disabled_preference if change?('setting_rss_disabled') end def merged_notification_emails @@ -241,6 +242,10 @@ class UserSettingsDecorator boolean_cast_setting 'setting_unpublish_on_delete' end + def rss_disabled_preference + boolean_cast_setting 'setting_rss_disabled' + end + def boolean_cast_setting(key) ActiveModel::Type::Boolean.new.cast(settings[key]) end |