diff options
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 b87635dbc..22601ecaa 100644 --- a/app/lib/user_settings_decorator.rb +++ b/app/lib/user_settings_decorator.rb @@ -66,6 +66,7 @@ class UserSettingsDecorator user.settings['home_reblogs'] = home_reblogs_preference if change?('setting_home_reblogs') user.settings['max_history_public'] = max_history_public_preference if change?('setting_max_history_public') user.settings['max_history_private'] = max_history_private_preference if change?('setting_max_history_private') + user.settings['web_push'] = web_push_preferences if change?('setting_web_push') end def merged_notification_emails @@ -256,6 +257,10 @@ class UserSettingsDecorator settings['setting_max_history_private'].to_i end + def web_push_preferences + boolean_cast_setting 'setting_web_push' + end + def boolean_cast_setting(key) ActiveModel::Type::Boolean.new.cast(settings[key]) end |