diff options
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 a95d09c5c..ac35fd005 100644 --- a/app/lib/user_settings_decorator.rb +++ b/app/lib/user_settings_decorator.rb @@ -38,6 +38,7 @@ class UserSettingsDecorator user.settings['show_application'] = show_application_preference if change?('setting_show_application') user.settings['advanced_layout'] = advanced_layout_preference if change?('setting_advanced_layout') user.settings['default_content_type']= default_content_type_preference if change?('setting_default_content_type') + user.settings['use_blurhash'] = use_blurhash_preference if change?('setting_use_blurhash') end def merged_notification_emails @@ -132,6 +133,10 @@ class UserSettingsDecorator settings['setting_default_content_type'] end + def use_blurhash_preference + boolean_cast_setting 'setting_use_blurhash' + end + def boolean_cast_setting(key) ActiveModel::Type::Boolean.new.cast(settings[key]) end |