Get compiling
This commit is contained in:
@@ -23,6 +23,7 @@ use std::{
|
||||
};
|
||||
|
||||
use anyhow::{anyhow, Context, Result};
|
||||
|
||||
use derive_more::Deref;
|
||||
use parking_lot::Mutex;
|
||||
use postage::oneshot;
|
||||
@@ -4127,6 +4128,12 @@ impl<T: View> ViewHandle<T> {
|
||||
self.window_id
|
||||
}
|
||||
|
||||
pub fn window<C: BorrowWindowContext>(&self, cx: &C) -> C::Result<AnyWindowHandle> {
|
||||
cx.read_window(self.window_id, |cx| {
|
||||
AnyWindowHandle::new(self.window_id, cx.window.root_view.type_id())
|
||||
})
|
||||
}
|
||||
|
||||
pub fn id(&self) -> usize {
|
||||
self.view_id
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ impl BorrowWindowContext for WindowContext<'_> {
|
||||
where
|
||||
F: FnOnce(&mut WindowContext) -> Option<T>,
|
||||
{
|
||||
BorrowWindowContext::update_window_optional(self, window_id, f)
|
||||
BorrowWindowContext::update_window(self, window_id, f)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user