Get collab2 green
This commit is contained in:
parent
c529343ba1
commit
e1525e2b47
265 changed files with 64477 additions and 40 deletions
|
@ -1364,6 +1364,18 @@ impl Context for WindowContext<'_> {
|
|||
window.update(self.app, update)
|
||||
}
|
||||
}
|
||||
|
||||
fn read_model<T, R>(
|
||||
&self,
|
||||
handle: &Model<T>,
|
||||
read: impl FnOnce(&T, &AppContext) -> R,
|
||||
) -> Self::Result<R>
|
||||
where
|
||||
T: 'static,
|
||||
{
|
||||
let entity = self.entities.read(handle);
|
||||
read(&*entity, &*self.app)
|
||||
}
|
||||
}
|
||||
|
||||
impl VisualContext for WindowContext<'_> {
|
||||
|
@ -2009,6 +2021,17 @@ impl<V> Context for ViewContext<'_, V> {
|
|||
{
|
||||
self.window_cx.update_window(window, update)
|
||||
}
|
||||
|
||||
fn read_model<T, R>(
|
||||
&self,
|
||||
handle: &Model<T>,
|
||||
read: impl FnOnce(&T, &AppContext) -> R,
|
||||
) -> Self::Result<R>
|
||||
where
|
||||
T: 'static,
|
||||
{
|
||||
self.window_cx.read_model(handle, read)
|
||||
}
|
||||
}
|
||||
|
||||
impl<V: 'static> VisualContext for ViewContext<'_, V> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue