Move IncomingCall
into call
crate
This commit is contained in:
parent
55cc142319
commit
7763acbdd5
5 changed files with 15 additions and 16 deletions
|
@ -2,7 +2,7 @@ mod participant;
|
||||||
pub mod room;
|
pub mod room;
|
||||||
|
|
||||||
use anyhow::{anyhow, Result};
|
use anyhow::{anyhow, Result};
|
||||||
use client::{incoming_call::IncomingCall, proto, Client, TypedEnvelope, UserStore};
|
use client::{proto, Client, TypedEnvelope, User, UserStore};
|
||||||
use gpui::{
|
use gpui::{
|
||||||
AppContext, AsyncAppContext, Entity, ModelContext, ModelHandle, MutableAppContext,
|
AppContext, AsyncAppContext, Entity, ModelContext, ModelHandle, MutableAppContext,
|
||||||
Subscription, Task,
|
Subscription, Task,
|
||||||
|
@ -18,6 +18,14 @@ pub fn init(client: Arc<Client>, user_store: ModelHandle<UserStore>, cx: &mut Mu
|
||||||
cx.set_global(active_call);
|
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 {
|
pub struct ActiveCall {
|
||||||
room: Option<(ModelHandle<Room>, Vec<Subscription>)>,
|
room: Option<(ModelHandle<Room>, Vec<Subscription>)>,
|
||||||
incoming_call: (
|
incoming_call: (
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
use crate::participant::{ParticipantLocation, RemoteParticipant};
|
use crate::{
|
||||||
|
participant::{ParticipantLocation, RemoteParticipant},
|
||||||
|
IncomingCall,
|
||||||
|
};
|
||||||
use anyhow::{anyhow, Result};
|
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 collections::{HashMap, HashSet};
|
||||||
use futures::StreamExt;
|
use futures::StreamExt;
|
||||||
use gpui::{AsyncAppContext, Entity, ModelContext, ModelHandle, MutableAppContext, Task};
|
use gpui::{AsyncAppContext, Entity, ModelContext, ModelHandle, MutableAppContext, Task};
|
||||||
|
|
|
@ -3,7 +3,6 @@ pub mod test;
|
||||||
|
|
||||||
pub mod channel;
|
pub mod channel;
|
||||||
pub mod http;
|
pub mod http;
|
||||||
pub mod incoming_call;
|
|
||||||
pub mod user;
|
pub mod user;
|
||||||
|
|
||||||
use anyhow::{anyhow, Context, Result};
|
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 call::{ActiveCall, IncomingCall};
|
||||||
use client::incoming_call::IncomingCall;
|
|
||||||
use futures::StreamExt;
|
use futures::StreamExt;
|
||||||
use gpui::{
|
use gpui::{
|
||||||
elements::*,
|
elements::*,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue