diff options
author | Thibaut Girka <thib@sitedethib.com> | 2019-05-13 14:42:39 +0200 |
---|---|---|
committer | ThibG <thib@sitedethib.com> | 2019-05-17 23:51:14 +0200 |
commit | a6b7c23f6fd33c209f83562fffb46211e062312e (patch) | |
tree | a3181ff040f41b6b16de7a8441bc55bdd266d907 /app/lib | |
parent | 0be93820f344fafc8618febde149e9c63d1ba5d4 (diff) |
Add option for default toot content-type
Diffstat (limited to 'app/lib')
-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 |