diff --git a/crates/client/src/user.rs b/crates/client/src/user.rs index 5be0125ff8ef97a9f226a1629275b464c771fa71..57a403ebadc964e574a194b5b82bbad74f638c99 100644 --- a/crates/client/src/user.rs +++ b/crates/client/src/user.rs @@ -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(()) } diff --git a/crates/collab/src/integration_tests.rs b/crates/collab/src/integration_tests.rs index 24326181991c96361d1dcc834642b337f36c2a66..9372bf5b2996dd04b4aca6a39bf4236e0cf64f7c 100644 --- a/crates/collab/src/integration_tests.rs +++ b/crates/collab/src/integration_tests.rs @@ -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 {