about summary refs log tree commit diff
path: root/app/lib/user_settings_decorator.rb
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-10-27 12:14:01 +0100
committerThibaut Girka <thib@sitedethib.com>2019-10-27 12:14:01 +0100
commit41a98b654372532c389e720a0ecd08b9a9884b6d (patch)
treeaff32a956d3d12d67b94e3193cd3a8d6b8446b9b /app/lib/user_settings_decorator.rb
parent18c07738a6b0fa3558863dbb1610695ab6f11b74 (diff)
parent4988ebba4e31aff5dee657836cf059b5843d9eb8 (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- README.md
- app/helpers/statuses_helper.rb
  Upstream moved account helpers to their own file, we had extra
  helpers there, moved too.
- app/lib/sanitize_config.rb
- app/models/user.rb
- app/serializers/initial_state_serializer.rb
- config/locales/simple_form.en.yml
- spec/lib/sanitize_config_spec.rb
Diffstat (limited to 'app/lib/user_settings_decorator.rb')
-rw-r--r--app/lib/user_settings_decorator.rb5
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