Rename model
based variable names to entity
(#24198)
## Context While looking through the client crate, I noticed that some of the old functions and variables were still using gpui::model name that was deprecated during the gpui3 transition. This PR renames those instances of model to entity to be more inline with gpui3. In addition, I also renamed `model` to `entity` in cases found by the below search terms given by @someone13574 - model = cx. - model: Entity - model: &Entity - OpenedModelHandle - model.update - model.upgrade - model = .*\.root (regex) - parent_model - model = cx.new - cx.spawn(move |model Release Notes: - N/A
This commit is contained in:
parent
27d1c689cf
commit
8c7096f7a6
40 changed files with 332 additions and 327 deletions
|
@ -821,13 +821,13 @@ impl Element for MarkdownElement {
|
|||
let mut context = KeyContext::default();
|
||||
context.add("Markdown");
|
||||
window.set_key_context(context);
|
||||
let model = self.markdown.clone();
|
||||
let entity = self.markdown.clone();
|
||||
window.on_action(std::any::TypeId::of::<crate::Copy>(), {
|
||||
let text = rendered_markdown.text.clone();
|
||||
move |_, phase, window, cx| {
|
||||
let text = text.clone();
|
||||
if phase == DispatchPhase::Bubble {
|
||||
model.update(cx, move |this, cx| this.copy(&text, window, cx))
|
||||
entity.update(cx, move |this, cx| this.copy(&text, window, cx))
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue