Show cursors for remote participants (#4082)
This PR enables cursors for remote participants. They are shown for 2 seconds when you focus a buffer, and then on hover. Release Notes: - Added usernames next to remote cursors
This commit is contained in:
commit
d76bd100f5
8 changed files with 209 additions and 7 deletions
|
@ -442,4 +442,13 @@ impl CollaborationHub for ChannelBufferCollaborationHub {
|
|||
) -> &'a HashMap<u64, ParticipantIndex> {
|
||||
self.0.read(cx).user_store().read(cx).participant_indices()
|
||||
}
|
||||
|
||||
fn user_names(&self, cx: &AppContext) -> HashMap<u64, SharedString> {
|
||||
let user_ids = self.collaborators(cx).values().map(|c| c.user_id);
|
||||
self.0
|
||||
.read(cx)
|
||||
.user_store()
|
||||
.read(cx)
|
||||
.participant_names(user_ids, cx)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue