diff options
author | ThibG <thib@sitedethib.com> | 2018-05-18 17:20:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-18 17:20:32 +0200 |
commit | 625c4f36ef394215e65e19157bfaf60e7de94b5f (patch) | |
tree | 72560d046b60c8478d10f26c212a70870e50eb2d /app/lib/user_settings_decorator.rb | |
parent | 023dfa119ed43fe35188e560c24cd3091c14ad0b (diff) | |
parent | 765fc6700cefcf326e8e4104f7f82ac5ed9b9bea (diff) |
Merge pull request #490 from glitch-soc/merge-upstream
Merge with tootsuite @ 57b503d4ef0754e4651eae26b628cba60e1ab4e9
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 78b3aa77c..f8bacb036 100644 --- a/app/lib/user_settings_decorator.rb +++ b/app/lib/user_settings_decorator.rb @@ -30,6 +30,7 @@ class UserSettingsDecorator user.settings['noindex'] = noindex_preference if change?('setting_noindex') user.settings['flavour'] = flavour_preference if change?('setting_flavour') user.settings['skin'] = skin_preference if change?('setting_skin') + user.settings['hide_network'] = hide_network_preference if change?('setting_hide_network') end def merged_notification_emails @@ -92,6 +93,10 @@ class UserSettingsDecorator settings['setting_skin'] end + def hide_network_preference + boolean_cast_setting 'setting_hide_network' + end + def boolean_cast_setting(key) ActiveModel::Type::Boolean.new.cast(settings[key]) end |