about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-06-26 19:33:04 +0200
committerEugen Rochko <eugen@zeonfederated.com>2019-06-26 19:33:04 +0200
commit3086c645fde2345d34e401bdf3e2f19f19da3294 (patch)
treeed008141ad3a2b7757c1b70d69419082ac3d4537 /app/lib
parent915c619394165a114a4ab316165aecac3386cf2f (diff)
Add option to disable blurhash previews (#11188)
* Add option to disable blurhash previews

* Update option text

* Change options order
Diffstat (limited to 'app/lib')
-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 bf2e5a962..aaf95cc19 100644
--- a/app/lib/user_settings_decorator.rb
+++ b/app/lib/user_settings_decorator.rb
@@ -34,6 +34,7 @@ class UserSettingsDecorator
     user.settings['aggregate_reblogs']   = aggregate_reblogs_preference if change?('setting_aggregate_reblogs')
     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['use_blurhash']        = use_blurhash_preference if change?('setting_use_blurhash')
   end
 
   def merged_notification_emails
@@ -112,6 +113,10 @@ class UserSettingsDecorator
     boolean_cast_setting 'setting_advanced_layout'
   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