Fix deafened -> enabled mistranslation

Fix mislocation of caller query in detach_and_log_error
Fix incorrect wording on livekit integration
Add share_mic action for manually enabling the microphone
Make mic sharing wait until the room has been fully established
This commit is contained in:
Mikayla Maki 2023-06-20 15:17:49 -07:00
parent dbd95e35cf
commit cf4251fb55
No known key found for this signature in database
4 changed files with 23 additions and 14 deletions

View file

@ -16,7 +16,7 @@ use std::sync::Arc;
use util::ResultExt;
use workspace::AppState;
actions!(collab, [ToggleScreenSharing, ToggleMute, ToggleDeafen]);
actions!(collab, [ToggleScreenSharing, ToggleMute, ToggleDeafen, ShareMic]);
pub fn init(app_state: &Arc<AppState>, cx: &mut AppContext) {
collab_titlebar_item::init(cx);
@ -30,6 +30,7 @@ pub fn init(app_state: &Arc<AppState>, cx: &mut AppContext) {
cx.add_global_action(toggle_screen_sharing);
cx.add_global_action(toggle_mute);
cx.add_global_action(toggle_deafen);
cx.add_global_action(share_mic);
}
pub fn toggle_screen_sharing(_: &ToggleScreenSharing, cx: &mut AppContext) {
@ -60,3 +61,9 @@ pub fn toggle_deafen(_: &ToggleDeafen, cx: &mut AppContext) {
.log_err();
}
}
pub fn share_mic(_: &ShareMic, cx: &mut AppContext) {
if let Some(room) = ActiveCall::global(cx).read(cx).room().cloned() {
room.update(cx, Room::share_mic).detach_and_log_err(cx)
}
}