Add setting for whether to crop images in unexpanded toots (#12126)
This commit is contained in:
parent
a6269b2f83
commit
48f75b86ae
10 changed files with 26 additions and 9 deletions
|
@ -37,6 +37,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
|
||||
|
@ -127,6 +128,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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue