More cleanup work

This commit is contained in:
Jonathan Kelley committed 2024-01-04 17:21:33 -08:00
1 parent ec3eaa6b26
commit 2171263eda
11 files changed
+601 -552

No files matched your search

+3 -6
View File
@@ -1,5 +1,5 @@
use crate::desktop_context::{EventData, UserWindowEvent};
use futures_util::{pin_mut, task::ArcWake, FutureExt};
use futures_util::task::ArcWake;
use std::sync::Arc;
use tao::{event_loop::EventLoopProxy, window::WindowId};
@@ -8,7 +8,7 @@ use tao::{event_loop::EventLoopProxy, window::WindowId};
/// This lets the VirtualDom "come up for air" and process events while the main thread is blocked by the WebView.
///
/// All other IO lives in the Tokio runtime,
pub fn tao_waker(proxy: &EventLoopProxy<UserWindowEvent>, id: WindowId) -> std::task::Waker {
pub fn tao_waker(proxy: EventLoopProxy<UserWindowEvent>, id: WindowId) -> std::task::Waker {
struct DomHandle {
proxy: EventLoopProxy<UserWindowEvent>,
id: WindowId,
@@ -27,8 +27,5 @@ pub fn tao_waker(proxy: &EventLoopProxy<UserWindowEvent>, id: WindowId) -> std::
}
}
futures_util::task::waker(Arc::new(DomHandle {
id,
proxy: proxy.clone(),
}))
futures_util::task::waker(Arc::new(DomHandle { id, proxy }))
}