Add microphone toggle events (#2765)

Release Notes:

- N/A
This commit is contained in:
Joseph T. Lyons 2023-07-20 16:10:20 -04:00 committed by GitHub
commit 6095525b56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 18 deletions

View file

@ -284,21 +284,6 @@ impl ActiveCall {
}
}
pub fn toggle_screen_sharing(&self, cx: &mut AppContext) {
if let Some(room) = self.room().cloned() {
let toggle_screen_sharing = room.update(cx, |room, cx| {
if room.is_screen_sharing() {
self.report_call_event("disable screen share", cx);
Task::ready(room.unshare_screen(cx))
} else {
self.report_call_event("enable screen share", cx);
room.share_screen(cx)
}
});
toggle_screen_sharing.detach_and_log_err(cx);
}
}
pub fn share_project(
&mut self,
project: ModelHandle<Project>,