0
0
Fork 0

Add option for default toot content-type

This commit is contained in:
Thibaut Girka 2019-05-13 14:42:39 +02:00 committed by ThibG
parent 0be93820f3
commit a6b7c23f6f
7 changed files with 18 additions and 2 deletions

View file

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