Remove more references to 'model' in GPUI APIs (#23693)

Release Notes:

- N/A
This commit is contained in:
Mikayla Maki 2025-01-26 20:00:27 -08:00 committed by GitHub
parent a6b1514246
commit 9cae96f82f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
115 changed files with 309 additions and 311 deletions

View file

@ -903,7 +903,7 @@ pub fn new_terminal_pane(
cx: &mut Context<TerminalPanel>,
) -> Entity<Pane> {
let is_local = project.read(cx).is_local();
let terminal_panel = cx.model().clone();
let terminal_panel = cx.entity().clone();
let pane = cx.new(|cx| {
let mut pane = Pane::new(
workspace.clone(),
@ -923,7 +923,7 @@ pub fn new_terminal_pane(
let split_closure_terminal_panel = terminal_panel.downgrade();
pane.set_can_split(Some(Arc::new(move |pane, dragged_item, _window, cx| {
if let Some(tab) = dragged_item.downcast_ref::<DraggedTab>() {
let is_current_pane = tab.pane == cx.model();
let is_current_pane = tab.pane == cx.entity();
let Some(can_drag_away) = split_closure_terminal_panel
.update(cx, |terminal_panel, _| {
let current_panes = terminal_panel.center.panes();
@ -963,7 +963,7 @@ pub fn new_terminal_pane(
return ControlFlow::Break(());
};
if let Some(tab) = dropped_item.downcast_ref::<DraggedTab>() {
let this_pane = cx.model().clone();
let this_pane = cx.entity().clone();
let item = if tab.pane == this_pane {
pane.item_for_index(tab.ix)
} else {