0
0
Fork 0

Add option to disable blurhash previews (#11188)

* Add option to disable blurhash previews

* Update option text

* Change options order
This commit is contained in:
ThibG 2019-06-26 19:33:04 +02:00 committed by Eugen Rochko
parent 915c619394
commit 3086c645fd
10 changed files with 21 additions and 3 deletions

View file

@ -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