mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-11 21:13:02 +00:00
Always rely on the server to cancel the incoming call
This commit is contained in:
parent
df285def59
commit
573086eed2
2 changed files with 6 additions and 6 deletions
|
@ -246,12 +246,8 @@ impl UserStore {
|
|||
}
|
||||
|
||||
pub fn decline_call(&mut self) -> Result<()> {
|
||||
let mut incoming_call = self.incoming_call.0.borrow_mut();
|
||||
if incoming_call.is_some() {
|
||||
if let Some(client) = self.client.upgrade() {
|
||||
client.send(proto::DeclineCall {})?;
|
||||
}
|
||||
*incoming_call = None;
|
||||
if let Some(client) = self.client.upgrade() {
|
||||
client.send(proto::DeclineCall {})?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
@ -118,6 +118,8 @@ async fn test_share_project_in_room(
|
|||
.update(cx_a, |room, cx| room.call(client_b.user_id().unwrap(), cx))
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
deterministic.run_until_parked();
|
||||
assert_eq!(
|
||||
participants(&room_a, &client_a, cx_a).await,
|
||||
RoomParticipants {
|
||||
|
@ -156,6 +158,8 @@ async fn test_share_project_in_room(
|
|||
.update(cx_a, |room, cx| room.call(client_c.user_id().unwrap(), cx))
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
deterministic.run_until_parked();
|
||||
assert_eq!(
|
||||
participants(&room_a, &client_a, cx_a).await,
|
||||
RoomParticipants {
|
||||
|
|
Loading…
Reference in a new issue