diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-07-16 06:30:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-16 06:30:47 +0200 |
commit | 9b1d3e4acb8190509d98ee4ef2ab9b24b45362ee (patch) | |
tree | 2b5b8920929eda9e26c8a4416b43986dbf3f2b01 /app/lib | |
parent | 4562c3cb7ec0b3b7c232a8d7347623f8e214acd7 (diff) |
Add option to disable real-time updates in web UI (#9984)
Fix #9031 Fix #7913
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 aaf95cc19..9ae9986c2 100644 --- a/app/lib/user_settings_decorator.rb +++ b/app/lib/user_settings_decorator.rb @@ -35,6 +35,7 @@ class UserSettingsDecorator user.settings['show_application'] = show_application_preference if change?('setting_show_application') user.settings['advanced_layout'] = advanced_layout_preference if change?('setting_advanced_layout') user.settings['use_blurhash'] = use_blurhash_preference if change?('setting_use_blurhash') + user.settings['use_pending_items'] = use_pending_items_preference if change?('setting_use_pending_items') end def merged_notification_emails @@ -117,6 +118,10 @@ class UserSettingsDecorator boolean_cast_setting 'setting_use_blurhash' end + def use_pending_items_preference + boolean_cast_setting 'setting_use_pending_items' + end + def boolean_cast_setting(key) ActiveModel::Type::Boolean.new.cast(settings[key]) end |