Rename other references from "handle" to "model"

Co-Authored-By: Max <max@zed.dev>
Co-Authored-By: Mikayla <mikayla@zed.dev>
This commit is contained in:
Antonio Scandurra
2023-10-30 19:54:32 +01:00
co-authored by Max Mikayla
parent ba789fc0c4
commit bc4f8fbf4e
13 changed files with 128 additions and 128 deletions
+3 -3
View File
@@ -13,7 +13,7 @@ use collections::HashSet;
use futures::{future::Shared, FutureExt};
use gpui2::{
AppContext, AsyncAppContext, Context, EventEmitter, Model, ModelContext, Subscription, Task,
WeakHandle,
WeakModel,
};
use postage::watch;
use project2::Project;
@@ -42,7 +42,7 @@ pub struct IncomingCall {
pub struct ActiveCall {
room: Option<(Model<Room>, Vec<Subscription>)>,
pending_room_creation: Option<Shared<Task<Result<Model<Room>, Arc<anyhow::Error>>>>>,
location: Option<WeakHandle<Project>>,
location: Option<WeakModel<Project>>,
pending_invites: HashSet<u64>,
incoming_call: (
watch::Sender<Option<IncomingCall>>,
@@ -347,7 +347,7 @@ impl ActiveCall {
}
}
pub fn location(&self) -> Option<&WeakHandle<Project>> {
pub fn location(&self) -> Option<&WeakModel<Project>> {
self.location.as_ref()
}
+2 -2
View File
@@ -1,7 +1,7 @@
use anyhow::{anyhow, Result};
use client2::ParticipantIndex;
use client2::{proto, User};
use gpui2::WeakHandle;
use gpui2::WeakModel;
pub use live_kit_client::Frame;
use project2::Project;
use std::{fmt, sync::Arc};
@@ -33,7 +33,7 @@ impl ParticipantLocation {
#[derive(Clone, Default)]
pub struct LocalParticipant {
pub projects: Vec<proto::ParticipantProject>,
pub active_project: Option<WeakHandle<Project>>,
pub active_project: Option<WeakModel<Project>>,
}
#[derive(Clone, Debug)]
+4 -4
View File
@@ -16,7 +16,7 @@ use collections::{BTreeMap, HashMap, HashSet};
use fs::Fs;
use futures::{FutureExt, StreamExt};
use gpui2::{
AppContext, AsyncAppContext, Context, EventEmitter, Model, ModelContext, Task, WeakHandle,
AppContext, AsyncAppContext, Context, EventEmitter, Model, ModelContext, Task, WeakModel,
};
use language2::LanguageRegistry;
use live_kit_client::{LocalTrackPublication, RemoteAudioTrackUpdate, RemoteVideoTrackUpdate};
@@ -61,8 +61,8 @@ pub struct Room {
channel_id: Option<u64>,
// live_kit: Option<LiveKitRoom>,
status: RoomStatus,
shared_projects: HashSet<WeakHandle<Project>>,
joined_projects: HashSet<WeakHandle<Project>>,
shared_projects: HashSet<WeakModel<Project>>,
joined_projects: HashSet<WeakModel<Project>>,
local_participant: LocalParticipant,
remote_participants: BTreeMap<u64, RemoteParticipant>,
pending_participants: Vec<Arc<User>>,
@@ -424,7 +424,7 @@ impl Room {
}
async fn maintain_connection(
this: WeakHandle<Self>,
this: WeakModel<Self>,
client: Arc<Client>,
mut cx: AsyncAppContext,
) -> Result<()> {