mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-29 22:02:06 +03:00
Prevent Room
from screen-sharing twice
This commit is contained in:
parent
ed6f482e68
commit
e49fc9f4b1
@ -615,6 +615,8 @@ impl Room {
|
||||
pub fn share_screen(&mut self, cx: &mut ModelContext<Self>) -> Task<Result<()>> {
|
||||
if self.status.is_offline() {
|
||||
return Task::ready(Err(anyhow!("room is offline")));
|
||||
} else if self.is_screen_sharing() {
|
||||
return Task::ready(Err(anyhow!("screen was already shared")));
|
||||
}
|
||||
|
||||
cx.spawn_weak(|this, mut cx| async move {
|
||||
|
Loading…
Reference in New Issue
Block a user