Fix compile issue
This commit is contained in:
2 files changed
+10
-8
No files matched your search
@@ -334,12 +334,14 @@ impl<P: 'static> App<P> {
|
|||||||
let mut cx = std::task::Context::from_waker(&view.waker);
|
let mut cx = std::task::Context::from_waker(&view.waker);
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
let fut = view.dom.wait_for_work();
|
{
|
||||||
pin_mut!(fut);
|
let fut = view.dom.wait_for_work();
|
||||||
|
pin_mut!(fut);
|
||||||
|
|
||||||
match fut.poll_unpin(&mut cx) {
|
match fut.poll_unpin(&mut cx) {
|
||||||
std::task::Poll::Ready(_) => {}
|
std::task::Poll::Ready(_) => {}
|
||||||
std::task::Poll::Pending => break,
|
std::task::Poll::Pending => break,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
send_edits(view.dom.render_immediate(), &view.desktop_context);
|
send_edits(view.dom.render_immediate(), &view.desktop_context);
|
||||||
|
|||||||
@@ -34,6 +34,9 @@ pub fn window() -> DesktopContext {
|
|||||||
dioxus_core::prelude::consume_context().unwrap()
|
dioxus_core::prelude::consume_context().unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// A handle to the [`DesktopService`] that can be passed around.
|
||||||
|
pub type DesktopContext = Rc<DesktopService>;
|
||||||
|
|
||||||
/// An imperative interface to the current window.
|
/// An imperative interface to the current window.
|
||||||
///
|
///
|
||||||
/// To get a handle to the current window, use the [`use_window`] hook.
|
/// To get a handle to the current window, use the [`use_window`] hook.
|
||||||
@@ -78,9 +81,6 @@ pub struct DesktopService {
|
|||||||
pub(crate) views: Rc<RefCell<Vec<*mut objc::runtime::Object>>>,
|
pub(crate) views: Rc<RefCell<Vec<*mut objc::runtime::Object>>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A handle to the [`DesktopService`] that can be passed around.
|
|
||||||
pub type DesktopContext = Rc<DesktopService>;
|
|
||||||
|
|
||||||
/// A smart pointer to the current window.
|
/// A smart pointer to the current window.
|
||||||
impl std::ops::Deref for DesktopService {
|
impl std::ops::Deref for DesktopService {
|
||||||
type Target = Window;
|
type Target = Window;
|
||||||
|
|||||||
Reference in new issue
Block a user