mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
user_groups: Handle add/remove members events.
This fixes the real-time sync for the user groups membership data structure to work like these work in the rest of Zulip; now, edits made in one browser are immediately and correctly reflected in other browsers.
This commit is contained in:
@@ -122,13 +122,6 @@ exports.populate_user_groups = function () {
|
||||
delete: JSON.stringify(removed),
|
||||
},
|
||||
success: function () {
|
||||
original_group = _.reject(original_group, function (e) {
|
||||
return removed.includes(e);
|
||||
});
|
||||
original_group = original_group.concat(added);
|
||||
group_data.members = original_group;
|
||||
user_groups.remove(group_data);
|
||||
user_groups.add(group_data);
|
||||
btn.text(i18n.t("Saved!")).delay(200).fadeOut(function () {
|
||||
$(this).html('<i class="fa fa-check" aria-hidden="true"></i>');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user