diff options
author | Reverite <github@reverite.sh> | 2019-05-21 20:48:57 -0700 |
---|---|---|
committer | Reverite <github@reverite.sh> | 2019-05-21 20:48:57 -0700 |
commit | d873e4f3d5878a2b2800758cbe3b9c870c228d51 (patch) | |
tree | 23a3a373699381d4bd4f629136b9c82de5df96a3 /app/lib/user_settings_decorator.rb | |
parent | 4cea89bf2e9ce7f73fccfc637191b1e039ad25ee (diff) | |
parent | 2332b3f146b0d879daba8a99bd35c8bf425edea3 (diff) |
Merge branch 'glitch' into production
Diffstat (limited to 'app/lib/user_settings_decorator.rb')
-rw-r--r-- | app/lib/user_settings_decorator.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/lib/user_settings_decorator.rb b/app/lib/user_settings_decorator.rb index 367ba9a83..802ca71fe 100644 --- a/app/lib/user_settings_decorator.rb +++ b/app/lib/user_settings_decorator.rb @@ -36,6 +36,7 @@ class UserSettingsDecorator user.settings['hide_network'] = hide_network_preference if change?('setting_hide_network') 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['default_content_type']= default_content_type_preference if change?('setting_default_content_type') end def merged_notification_emails @@ -122,6 +123,10 @@ class UserSettingsDecorator boolean_cast_setting 'setting_aggregate_reblogs' end + def default_content_type_preference + settings['setting_default_content_type'] + end + def boolean_cast_setting(key) ActiveModel::Type::Boolean.new.cast(settings[key]) end |