Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Sort collaborators in titlebar alphabetically instead of by replica id
Julia981b3a459f2d
diff --git a/crates/collab_ui/src/collab_titlebar_item.rs b/crates/collab_ui/src/collab_titlebar_item.rsindex f9f5738ad26..c838f6a55fc 100644--- a/crates/collab_ui/src/collab_titlebar_item.rs+++ b/crates/collab_ui/src/collab_titlebar_item.rs@@ -572,15 +572,13 @@ impl CollabTitlebarItem {room: &ModelHandle<Room>,cx: &mut RenderContext<Self>,) -> Vec<ElementBox> {- let project = workspace.read(cx).project().read(cx);-let mut participants = room.read(cx).remote_participants().values().cloned().collect::<Vec<_>>();- participants.sort_by_key(|p| Some(project.collaborators().get(&p.peer_id)?.replica_id));+ participants.sort_by_cached_key(|p| p.user.github_login.clone());participants.into_iter()