Remove more references to 'model' in GPUI APIs (#23693)
Release Notes: - N/A
This commit is contained in:
parent
a6b1514246
commit
9cae96f82f
115 changed files with 309 additions and 311 deletions
|
@ -91,7 +91,7 @@ async fn test_host_disconnect(
|
|||
)
|
||||
});
|
||||
let cx_b = &mut VisualTestContext::from_window(*workspace_b, cx_b);
|
||||
let workspace_b_view = workspace_b.root_model(cx_b).unwrap();
|
||||
let workspace_b_view = workspace_b.root(cx_b).unwrap();
|
||||
|
||||
let editor_b = workspace_b
|
||||
.update(cx_b, |workspace, window, cx| {
|
||||
|
|
|
@ -21,14 +21,14 @@ async fn test_notifications(
|
|||
let notification_events_b = Arc::new(Mutex::new(Vec::new()));
|
||||
client_a.notification_store().update(cx_a, |_, cx| {
|
||||
let events = notification_events_a.clone();
|
||||
cx.subscribe(&cx.model(), move |_, _, event, _| {
|
||||
cx.subscribe(&cx.entity(), move |_, _, event, _| {
|
||||
events.lock().push(event.clone());
|
||||
})
|
||||
.detach()
|
||||
});
|
||||
client_b.notification_store().update(cx_b, |_, cx| {
|
||||
let events = notification_events_b.clone();
|
||||
cx.subscribe(&cx.model(), move |_, _, event, _| {
|
||||
cx.subscribe(&cx.entity(), move |_, _, event, _| {
|
||||
events.lock().push(event.clone());
|
||||
})
|
||||
.detach()
|
||||
|
|
|
@ -849,7 +849,7 @@ impl TestClient {
|
|||
) -> (Entity<Workspace>, &'a mut VisualTestContext) {
|
||||
let window = cx.update(|cx| cx.active_window().unwrap().downcast::<Workspace>().unwrap());
|
||||
|
||||
let model = window.root_model(cx).unwrap();
|
||||
let model = window.root(cx).unwrap();
|
||||
let cx = VisualTestContext::from_window(*window.deref(), cx).as_mut();
|
||||
// it might be nice to try and cleanup these at the end of each test.
|
||||
(model, cx)
|
||||
|
@ -861,7 +861,7 @@ pub fn open_channel_notes(
|
|||
cx: &mut VisualTestContext,
|
||||
) -> Task<anyhow::Result<Entity<ChannelView>>> {
|
||||
let window = cx.update(|_, cx| cx.active_window().unwrap().downcast::<Workspace>().unwrap());
|
||||
let model = window.root_model(cx).unwrap();
|
||||
let model = window.root(cx).unwrap();
|
||||
|
||||
cx.update(|window, cx| ChannelView::open(channel_id, None, model.clone(), window, cx))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue