mirror of
https://github.com/zulip/zulip.git
synced 2025-11-12 09:58:06 +00:00
settings: Move the user-privacy settings related code at one place.
This commit makes small refactoring to place all the user-privacy settings code in 'server_events_dispatch.js' at one place and use a common function 'settings_account.update_privacy_settings_box' to update the UI. This also helps in early return instead of executing a lot of `if` statements related to user-preferences settings.
This commit is contained in:
committed by
Tim Abbott
parent
75f6ae6d20
commit
00fb8f3014
@@ -1117,6 +1117,7 @@ run_test("user_settings", ({override}) => {
|
||||
event = event_fixtures.user_settings__presence_disabled;
|
||||
user_settings.presence_enabled = true;
|
||||
override(activity_ui, "redraw_user", noop);
|
||||
override(settings_account, "update_privacy_settings_box", noop);
|
||||
dispatch(event);
|
||||
assert_same(user_settings.presence_enabled, false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user