mirror of
https://github.com/zed-industries/zed.git
synced 2024-09-19 02:17:35 +03:00
Move IncomingCall
into call
crate
This commit is contained in:
parent
55cc142319
commit
7763acbdd5
@ -2,7 +2,7 @@ mod participant;
|
||||
pub mod room;
|
||||
|
||||
use anyhow::{anyhow, Result};
|
||||
use client::{incoming_call::IncomingCall, proto, Client, TypedEnvelope, UserStore};
|
||||
use client::{proto, Client, TypedEnvelope, User, UserStore};
|
||||
use gpui::{
|
||||
AppContext, AsyncAppContext, Entity, ModelContext, ModelHandle, MutableAppContext,
|
||||
Subscription, Task,
|
||||
@ -18,6 +18,14 @@ pub fn init(client: Arc<Client>, user_store: ModelHandle<UserStore>, cx: &mut Mu
|
||||
cx.set_global(active_call);
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct IncomingCall {
|
||||
pub room_id: u64,
|
||||
pub caller: Arc<User>,
|
||||
pub participants: Vec<Arc<User>>,
|
||||
pub initial_project_id: Option<u64>,
|
||||
}
|
||||
|
||||
pub struct ActiveCall {
|
||||
room: Option<(ModelHandle<Room>, Vec<Subscription>)>,
|
||||
incoming_call: (
|
||||
|
@ -1,6 +1,9 @@
|
||||
use crate::participant::{ParticipantLocation, RemoteParticipant};
|
||||
use crate::{
|
||||
participant::{ParticipantLocation, RemoteParticipant},
|
||||
IncomingCall,
|
||||
};
|
||||
use anyhow::{anyhow, Result};
|
||||
use client::{incoming_call::IncomingCall, proto, Client, PeerId, TypedEnvelope, User, UserStore};
|
||||
use client::{proto, Client, PeerId, TypedEnvelope, User, UserStore};
|
||||
use collections::{HashMap, HashSet};
|
||||
use futures::StreamExt;
|
||||
use gpui::{AsyncAppContext, Entity, ModelContext, ModelHandle, MutableAppContext, Task};
|
||||
|
@ -3,7 +3,6 @@ pub mod test;
|
||||
|
||||
pub mod channel;
|
||||
pub mod http;
|
||||
pub mod incoming_call;
|
||||
pub mod user;
|
||||
|
||||
use anyhow::{anyhow, Context, Result};
|
||||
|
@ -1,10 +0,0 @@
|
||||
use crate::User;
|
||||
use std::sync::Arc;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct IncomingCall {
|
||||
pub room_id: u64,
|
||||
pub caller: Arc<User>,
|
||||
pub participants: Vec<Arc<User>>,
|
||||
pub initial_project_id: Option<u64>,
|
||||
}
|
@ -1,5 +1,4 @@
|
||||
use call::ActiveCall;
|
||||
use client::incoming_call::IncomingCall;
|
||||
use call::{ActiveCall, IncomingCall};
|
||||
use futures::StreamExt;
|
||||
use gpui::{
|
||||
elements::*,
|
||||
|
Loading…
Reference in New Issue
Block a user