Add os-webview feature to wry to fix builds
This commit is contained in:
3 files changed
+9
-20
No files matched your search
@@ -82,8 +82,8 @@ impl std::ops::Deref for DesktopService {
|
||||
|
||||
impl DesktopService {
|
||||
pub(crate) fn new(
|
||||
window: Window,
|
||||
webview: WebView,
|
||||
window: Window,
|
||||
shared: Rc<SharedContext>,
|
||||
edit_queue: EditQueue,
|
||||
asset_handlers: AssetHandlerRegistry,
|
||||
|
||||
@@ -73,15 +73,12 @@ impl WebviewInstance {
|
||||
// Otherwise, try to serve an asset, either from the user or the filesystem
|
||||
match index_bytes {
|
||||
Some(body) => responder.respond(body),
|
||||
None => {
|
||||
// we need to do this in the context of the dioxus runtime since the user gave us these closures
|
||||
protocol::desktop_handler(
|
||||
request,
|
||||
asset_handlers_.clone(),
|
||||
&edit_queue_,
|
||||
responder,
|
||||
);
|
||||
}
|
||||
None => protocol::desktop_handler(
|
||||
request,
|
||||
asset_handlers_.clone(),
|
||||
&edit_queue_,
|
||||
responder,
|
||||
),
|
||||
}
|
||||
};
|
||||
|
||||
@@ -143,11 +140,9 @@ impl WebviewInstance {
|
||||
webview = webview.with_devtools(true);
|
||||
}
|
||||
|
||||
let webview = webview.build().unwrap();
|
||||
|
||||
let desktop_context = Rc::from(DesktopService::new(
|
||||
webview.build().unwrap(),
|
||||
window,
|
||||
webview,
|
||||
shared.clone(),
|
||||
edit_queue,
|
||||
asset_handlers,
|
||||
@@ -161,7 +156,6 @@ impl WebviewInstance {
|
||||
.provide_context(Rc::new(DesktopEvalProvider::new(desktop_context.clone())));
|
||||
|
||||
WebviewInstance {
|
||||
// We want to poll the virtualdom and the event loop at the same time, so the waker will be connected to both
|
||||
waker: tao_waker(shared.proxy.clone(), desktop_context.window.id()),
|
||||
desktop_context,
|
||||
dom,
|
||||
|
||||
Reference in new issue
Block a user