diff options
author | David Yip <yipdw@member.fsf.org> | 2018-02-10 22:08:45 -0600 |
---|---|---|
committer | David Yip <yipdw@member.fsf.org> | 2018-02-10 22:08:45 -0600 |
commit | b6159bcb0a20f3aabfb4d17ad60842b7aa81925c (patch) | |
tree | 5fbc5ebb3890ddbf0399bc1fd448f109561b2771 /app/lib | |
parent | 136458eaf4f73abc5bcb5d0b0978aff892e92f27 (diff) | |
parent | b8efc3fc0b961d356472cf2e56fde69a6589ffaa (diff) |
Merge remote-tracking branch 'origin/merge-upstream'
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/user_settings_decorator.rb | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/app/lib/user_settings_decorator.rb b/app/lib/user_settings_decorator.rb index 5f0176f27..c7afdacc2 100644 --- a/app/lib/user_settings_decorator.rb +++ b/app/lib/user_settings_decorator.rb @@ -15,20 +15,21 @@ class UserSettingsDecorator private def process_update - user.settings['notification_emails'] = merged_notification_emails if change?('notification_emails') - user.settings['interactions'] = merged_interactions if change?('interactions') - user.settings['default_privacy'] = default_privacy_preference if change?('setting_default_privacy') - user.settings['default_sensitive'] = default_sensitive_preference if change?('setting_default_sensitive') - user.settings['unfollow_modal'] = unfollow_modal_preference if change?('setting_unfollow_modal') - user.settings['boost_modal'] = boost_modal_preference if change?('setting_boost_modal') + user.settings['notification_emails'] = merged_notification_emails if change?('notification_emails') + user.settings['interactions'] = merged_interactions if change?('interactions') + user.settings['default_privacy'] = default_privacy_preference if change?('setting_default_privacy') + user.settings['default_sensitive'] = default_sensitive_preference if change?('setting_default_sensitive') + user.settings['unfollow_modal'] = unfollow_modal_preference if change?('setting_unfollow_modal') + user.settings['boost_modal'] = boost_modal_preference if change?('setting_boost_modal') user.settings['favourite_modal'] = favourite_modal_preference if change?('setting_favourite_modal') - user.settings['delete_modal'] = delete_modal_preference if change?('setting_delete_modal') - user.settings['auto_play_gif'] = auto_play_gif_preference if change?('setting_auto_play_gif') - user.settings['reduce_motion'] = reduce_motion_preference if change?('setting_reduce_motion') - user.settings['system_font_ui'] = system_font_ui_preference if change?('setting_system_font_ui') - user.settings['noindex'] = noindex_preference if change?('setting_noindex') - user.settings['flavour'] = flavour_preference if change?('setting_flavour') - user.settings['skin'] = skin_preference if change?('setting_skin') + user.settings['delete_modal'] = delete_modal_preference if change?('setting_delete_modal') + user.settings['auto_play_gif'] = auto_play_gif_preference if change?('setting_auto_play_gif') + user.settings['display_sensitive_media'] = display_sensitive_media_preference if change?('setting_display_sensitive_media') + user.settings['reduce_motion'] = reduce_motion_preference if change?('setting_reduce_motion') + user.settings['system_font_ui'] = system_font_ui_preference if change?('setting_system_font_ui') + user.settings['noindex'] = noindex_preference if change?('setting_noindex') + user.settings['flavour'] = flavour_preference if change?('setting_flavour') + user.settings['skin'] = skin_preference if change?('setting_skin') end def merged_notification_emails @@ -71,6 +72,10 @@ class UserSettingsDecorator boolean_cast_setting 'setting_auto_play_gif' end + def display_sensitive_media_preference + boolean_cast_setting 'setting_display_sensitive_media' + end + def reduce_motion_preference boolean_cast_setting 'setting_reduce_motion' end |