0
0
Fork 0

Add a per-user setting to hide followers count

This is only available if the instance-wide setting isn't set and allows
people to hide their own followers count. This does not hide others' to
them.
This commit is contained in:
Thibaut Girka 2018-12-18 11:24:44 +01:00 committed by ThibG
parent 9e04b2e8a4
commit bd23288a52
10 changed files with 18 additions and 7 deletions

View file

@ -30,6 +30,7 @@ class UserSettingsDecorator
user.settings['reduce_motion'] = reduce_motion_preference if change?('setting_reduce_motion')
user.settings['system_font_ui'] = system_font_ui_preference if change?('setting_system_font_ui')
user.settings['noindex'] = noindex_preference if change?('setting_noindex')
user.settings['hide_followers_count']= hide_followers_count_preference if change?('setting_hide_followers_count')
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')
@ -92,6 +93,10 @@ class UserSettingsDecorator
boolean_cast_setting 'setting_noindex'
end
def hide_followers_count_preference
boolean_cast_setting 'setting_hide_followers_count'
end
def flavour_preference
settings['setting_flavour']
end