Move IncomingCall into call crate

This commit is contained in:
Antonio Scandurra 2022-10-06 09:52:03 +02:00
parent 55cc142319
commit 7763acbdd5
5 changed files with 15 additions and 16 deletions

View file

@ -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: (

View file

@ -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};