fix dioxus desktop build

This commit is contained in:
Evan Almloff 2024-01-15 09:19:52 -06:00
parent 20480c0a2d
commit 9133c0a305
2 changed files with 2 additions and 4 deletions

View file

@ -9,9 +9,8 @@ use crate::{
AssetRequest, Config,
};
use dioxus_core::{
once,
prelude::{current_scope_id, ScopeId},
VirtualDom,
use_hook, VirtualDom,
};
use dioxus_interpreter_js::binary_protocol::Channel;
use dioxus_interpreter_js::MutationState;
@ -385,7 +384,7 @@ impl WryWindowEventHandlerInner {
pub fn use_wry_event_handler(
handler: impl FnMut(&Event<UserWindowEvent>, &EventLoopWindowTarget<UserWindowEvent>) + 'static,
) -> WryEventHandler {
once(move || {
use_hook(move || {
let desktop = window();
let id = desktop.create_wry_event_handler(handler);

View file

@ -107,7 +107,6 @@ pub(super) fn desktop_handler(
) {
// If the request is asking for edits (ie binary protocol streaming, do that)
if request.uri().path().trim_matches('/') == "edits" {
println!("Handling edits from handler");
return edit_queue.handle_request(responder);
}