0
0
Fork 0

Add setting to not aggregate reblogs (#9248)

* Add setting to not aggregate reblogs

Fixes #9222

* Handle cases where user is nil in add_to_home and add_to_list

* Add hint for setting_aggregate_reblogs option

* Reword setting_aggregate_reblogs label
This commit is contained in:
ThibG 2018-12-09 13:03:01 +01:00 committed by Eugen Rochko
parent 6b78e5b5ab
commit 81bda7d67c
7 changed files with 23 additions and 7 deletions

View file

@ -31,6 +31,7 @@ class UserSettingsDecorator
user.settings['noindex'] = noindex_preference if change?('setting_noindex')
user.settings['theme'] = theme_preference if change?('setting_theme')
user.settings['hide_network'] = hide_network_preference if change?('setting_hide_network')
user.settings['aggregate_reblogs'] = aggregate_reblogs_preference if change?('setting_aggregate_reblogs')
end
def merged_notification_emails
@ -97,6 +98,10 @@ class UserSettingsDecorator
settings['setting_default_language']
end
def aggregate_reblogs_preference
boolean_cast_setting 'setting_aggregate_reblogs'
end
def boolean_cast_setting(key)
ActiveModel::Type::Boolean.new.cast(settings[key])
end