mirror of
https://github.com/zulip/zulip.git
synced 2026-07-09 21:21:47 +08:00
user_profile: Sort the stream list on update.
This commit fixes the issue of reordering the stream list when the user unsubscribes from a stream. The issue was caused because, on rendering, we sorted the list by name but did not sort it while updating the stream list on any update.
This commit is contained in:
parent
59cf305053
commit
1e85683570
@ -46,6 +46,7 @@ export function update_user_profile_streams_list_for_users(user_ids) {
|
||||
const user_id = get_user_id_if_user_profile_modal_open();
|
||||
if (user_id && user_ids.includes(user_id) && user_streams_list_widget !== undefined) {
|
||||
const user_streams = stream_data.get_streams_for_user(user_id).subscribed;
|
||||
user_streams.sort(compare_by_name);
|
||||
user_streams_list_widget.replace_list_data(user_streams);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user