diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-09-21 21:15:33 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-09-21 21:15:33 -0500 |
commit | 6fedf5a6e283a7a615920b48da40aa5d9ef1fd4e (patch) | |
tree | 4adffe4b81a8b1410f836cc8e46a8efb9464d58d /app/lib/user_settings_decorator.rb | |
parent | 1575d744fb45605b918f75ebb9ea67e53cb774a2 (diff) |
Add option to filter boosts from home timeline at backend level
Diffstat (limited to 'app/lib/user_settings_decorator.rb')
-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 41b420ad0..e863550da 100644 --- a/app/lib/user_settings_decorator.rb +++ b/app/lib/user_settings_decorator.rb @@ -63,6 +63,7 @@ class UserSettingsDecorator 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') + user.settings['no_boosts_home'] = no_boosts_home_preference if change?('setting_no_boosts_home') end def merged_notification_emails @@ -241,6 +242,10 @@ class UserSettingsDecorator boolean_cast_setting 'setting_rss_disabled' end + def no_boosts_home_preference + boolean_cast_setting 'setting_no_boosts_home' + end + def boolean_cast_setting(key) ActiveModel::Type::Boolean.new.cast(settings[key]) end |