diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-05-04 19:25:58 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-05-21 03:16:22 -0500 |
commit | 992218f05f76106857f2cb5a72c0bb4510aa4563 (patch) | |
tree | 11b1f7636e09abd48f72d6a4a611dc1ae8b90d9b /app/lib | |
parent | 545330dc657e78ee17bb58b094328054380eeb4f (diff) |
Anxiety reduction: add option to hide mascot.
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/user_settings_decorator.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/lib/user_settings_decorator.rb b/app/lib/user_settings_decorator.rb index 39e8a82fe..3dff63af4 100644 --- a/app/lib/user_settings_decorator.rb +++ b/app/lib/user_settings_decorator.rb @@ -32,8 +32,9 @@ class UserSettingsDecorator user.settings['hide_mntions_packm8'] = hide_mntions_packm8_preference if change?('setting_hide_mntions_packm8') user.settings['gently_kobolds'] = gently_kobolds_preference if change?('setting_gently_kobolds') user.settings['user_is_kobold'] = user_is_kobold_preference if change?('setting_user_is_kobold') - user.settings['hide_captions'] = hide_captions_preference if change?('setting_hide_captions') + user.settings['hide_mascot'] = hide_mascot_preference if change?('setting_hide_mascot') + 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') @@ -110,6 +111,10 @@ class UserSettingsDecorator boolean_cast_setting 'setting_user_is_kobold' end + def hide_mascot_preference + boolean_cast_setting 'setting_hide_mascot' + end + def merged_notification_emails user.settings['notification_emails'].merge coerced_settings('notification_emails').to_h end |