mirror of
https://github.com/zed-industries/zed.git
synced 2024-09-20 02:47:34 +03:00
Tidy up branch
This commit is contained in:
parent
fcf7007e0b
commit
d2afc97b53
@ -156,8 +156,6 @@ impl Database {
|
|||||||
initial_project_id: Option<ProjectId>,
|
initial_project_id: Option<ProjectId>,
|
||||||
) -> Result<RoomGuard<(proto::Room, proto::IncomingCall)>> {
|
) -> Result<RoomGuard<(proto::Room, proto::IncomingCall)>> {
|
||||||
self.room_transaction(room_id, |tx| async move {
|
self.room_transaction(room_id, |tx| async move {
|
||||||
let room = self.get_room(room_id, &tx).await?;
|
|
||||||
|
|
||||||
let caller = room_participant::Entity::find()
|
let caller = room_participant::Entity::find()
|
||||||
.filter(
|
.filter(
|
||||||
room_participant::Column::UserId
|
room_participant::Column::UserId
|
||||||
@ -196,6 +194,7 @@ impl Database {
|
|||||||
.insert(&*tx)
|
.insert(&*tx)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
|
let room = self.get_room(room_id, &tx).await?;
|
||||||
let incoming_call = Self::build_incoming_call(&room, called_user_id)
|
let incoming_call = Self::build_incoming_call(&room, called_user_id)
|
||||||
.ok_or_else(|| anyhow!("failed to build incoming call"))?;
|
.ok_or_else(|| anyhow!("failed to build incoming call"))?;
|
||||||
Ok((room, incoming_call))
|
Ok((room, incoming_call))
|
||||||
@ -1172,7 +1171,6 @@ impl Database {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
drop(db_participants);
|
drop(db_participants);
|
||||||
dbg!(&participants);
|
|
||||||
|
|
||||||
let mut db_projects = db_room
|
let mut db_projects = db_room
|
||||||
.find_related(project::Entity)
|
.find_related(project::Entity)
|
||||||
|
@ -1504,7 +1504,7 @@ async fn join_project(
|
|||||||
// First, we send the metadata associated with each worktree.
|
// First, we send the metadata associated with each worktree.
|
||||||
response.send(proto::JoinProjectResponse {
|
response.send(proto::JoinProjectResponse {
|
||||||
worktrees: worktrees.clone(),
|
worktrees: worktrees.clone(),
|
||||||
replica_id: Some(replica_id.0 as u32),
|
replica_id: replica_id.0 as u32,
|
||||||
collaborators: collaborators.clone(),
|
collaborators: collaborators.clone(),
|
||||||
language_servers: project.language_servers.clone(),
|
language_servers: project.language_servers.clone(),
|
||||||
})?;
|
})?;
|
||||||
|
@ -715,8 +715,7 @@ impl Project {
|
|||||||
})
|
})
|
||||||
.await?;
|
.await?;
|
||||||
let this = cx.new_model(|cx| {
|
let this = cx.new_model(|cx| {
|
||||||
// todo!()
|
let replica_id = response.payload.replica_id as ReplicaId;
|
||||||
let replica_id = response.payload.replica_id.unwrap() as ReplicaId;
|
|
||||||
|
|
||||||
let mut worktrees = Vec::new();
|
let mut worktrees = Vec::new();
|
||||||
for worktree in response.payload.worktrees {
|
for worktree in response.payload.worktrees {
|
||||||
|
@ -369,7 +369,7 @@ message JoinProject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
message JoinProjectResponse {
|
message JoinProjectResponse {
|
||||||
optional uint32 replica_id = 1;
|
uint32 replica_id = 1;
|
||||||
repeated WorktreeMetadata worktrees = 2;
|
repeated WorktreeMetadata worktrees = 2;
|
||||||
repeated Collaborator collaborators = 3;
|
repeated Collaborator collaborators = 3;
|
||||||
repeated LanguageServer language_servers = 4;
|
repeated LanguageServer language_servers = 4;
|
||||||
|
Loading…
Reference in New Issue
Block a user