This commit is contained in:
Mikayla 2023-11-09 00:18:00 -08:00
parent 43eb7f28d1
commit 656eb9d455
No known key found for this signature in database
9 changed files with 451 additions and 249 deletions

View file

@ -1011,7 +1011,7 @@ impl Context for AppContext {
fn read_window<T, R>(
&self,
window: &WindowHandle<T>,
read: impl FnOnce(&T, &AppContext) -> R,
read: impl FnOnce(View<T>, &AppContext) -> R,
) -> Result<R>
where
T: 'static,
@ -1028,7 +1028,7 @@ impl Context for AppContext {
.downcast::<T>()
.map_err(|_| anyhow!("root view's type has changed"))?;
Ok(read(view.read(self), self))
Ok(read(view, self))
}
}