mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
user_groups: Fix live updating user groups UI.
This commit updates code to live update the groups UI if realm or group level setting to manage groups is changed. This commit also does some refactoring to better organize the code in different functions. And also, the code to hide/disable the UI if the user does not have permission to manage the group in JS such that the same code is used for live-updating as well.
This commit is contained in:
@@ -201,7 +201,7 @@ export function dispatch_normal_event(event) {
|
||||
allow_edit_history: noop,
|
||||
allow_message_editing: noop,
|
||||
edit_topic_policy: noop,
|
||||
user_group_edit_policy: noop,
|
||||
user_group_edit_policy: user_group_edit.update_group_management_ui,
|
||||
avatar_changes_disabled: settings_account.update_avatar_change_display,
|
||||
bot_creation_policy: settings_bots.update_bot_permissions_ui,
|
||||
can_delete_any_message_group: noop,
|
||||
@@ -930,7 +930,7 @@ export function dispatch_normal_event(event) {
|
||||
break;
|
||||
case "update":
|
||||
user_groups.update(event);
|
||||
user_group_edit.update_group(event.group_id);
|
||||
user_group_edit.update_group(event);
|
||||
break;
|
||||
default:
|
||||
blueslip.error("Unexpected event type user_group/" + event.op);
|
||||
|
||||
Reference in New Issue
Block a user