diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-04-07 23:50:13 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-05-21 03:16:21 -0500 |
commit | caf265bbebe0fda892ff4fd437f91a17027b8258 (patch) | |
tree | f26c5aae06ee84554d9a8c90747baf6bb0cb9205 /app/lib | |
parent | 2ee72d3aaf184c6bd109f96a9d07be5bb89e00c8 (diff) |
add option to toggle captions + code: move monsterpit additons on top
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/user_settings_decorator.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/app/lib/user_settings_decorator.rb b/app/lib/user_settings_decorator.rb index a851ff217..182fb640b 100644 --- a/app/lib/user_settings_decorator.rb +++ b/app/lib/user_settings_decorator.rb @@ -15,13 +15,14 @@ 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_local'] = default_local_preference if change?('setting_default_local') user.settings['always_local'] = always_local_preference if change?('setting_always_local') user.settings['rawr_federated'] = rawr_federated_preference if change?('setting_rawr_federated') user.settings['hide_stats'] = hide_stats_preference if change?('setting_hide_stats') + user.settings['hide_captions'] = hide_captions_preference if change?('setting_hide_captions') + 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['default_language'] = default_language_preference if change?('setting_default_language') user.settings['unfollow_modal'] = unfollow_modal_preference if change?('setting_unfollow_modal') @@ -71,6 +72,10 @@ class UserSettingsDecorator boolean_cast_setting 'setting_hide_stats' end + def hide_captions_preference + boolean_cast_setting 'setting_hide_captions' + end + def default_sensitive_preference boolean_cast_setting 'setting_default_sensitive' end |