diff options
author | ThibG <thib@sitedethib.com> | 2019-10-28 16:25:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-28 16:25:55 +0100 |
commit | 00793a86bc52e4cb37318e42ea4ceb37a896c727 (patch) | |
tree | 1c49c58aa3c45a4ccc5c513ed0539facaf6cc137 /app/lib/user_settings_decorator.rb | |
parent | 18c07738a6b0fa3558863dbb1610695ab6f11b74 (diff) | |
parent | 046cd05a839896ffa3aedb3270c7487f0766bdf9 (diff) |
Merge pull request #1240 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
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 c822d54de..2f9cfe3ad 100644 --- a/app/lib/user_settings_decorator.rb +++ b/app/lib/user_settings_decorator.rb @@ -42,6 +42,7 @@ class UserSettingsDecorator user.settings['use_blurhash'] = use_blurhash_preference if change?('setting_use_blurhash') user.settings['use_pending_items'] = use_pending_items_preference if change?('setting_use_pending_items') user.settings['trends'] = trends_preference if change?('setting_trends') + user.settings['crop_images'] = crop_images_preference if change?('setting_crop_images') end def merged_notification_emails @@ -152,6 +153,10 @@ class UserSettingsDecorator boolean_cast_setting 'setting_trends' end + def crop_images_preference + boolean_cast_setting 'setting_crop_images' + end + def boolean_cast_setting(key) ActiveModel::Type::Boolean.new.cast(settings[key]) end |