guest promotion (#3969)
Release Notes: - Adds the ability to promote read-only guests to read-write participants in calls
This commit is contained in:
commit
5d3f5611e5
24 changed files with 579 additions and 163 deletions
|
@ -2,7 +2,7 @@ use crate::{Toast, Workspace};
|
|||
use collections::HashMap;
|
||||
use gpui::{
|
||||
AnyView, AppContext, AsyncWindowContext, DismissEvent, Entity, EntityId, EventEmitter, Render,
|
||||
View, ViewContext, VisualContext,
|
||||
Task, View, ViewContext, VisualContext, WindowContext,
|
||||
};
|
||||
use std::{any::TypeId, ops::DerefMut};
|
||||
|
||||
|
@ -292,3 +292,18 @@ where
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub trait NotifyTaskExt {
|
||||
fn detach_and_notify_err(self, cx: &mut WindowContext);
|
||||
}
|
||||
|
||||
impl<R, E> NotifyTaskExt for Task<Result<R, E>>
|
||||
where
|
||||
E: std::fmt::Debug + 'static,
|
||||
R: 'static,
|
||||
{
|
||||
fn detach_and_notify_err(self, cx: &mut WindowContext) {
|
||||
cx.spawn(|mut cx| async move { self.await.notify_async_err(&mut cx) })
|
||||
.detach();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue