fix dioxus desktop build

This commit is contained in:
Evan Almloff committed 2024-01-15 09:19:52 -06:00
1 parent 20480c0a2d
commit 9133c0a305
2 files changed
+2 -4

No files matched your search

+2 -3
View File
@@ -9,9 +9,8 @@ use crate::{
AssetRequest, Config, AssetRequest, Config,
}; };
use dioxus_core::{ use dioxus_core::{
once,
prelude::{current_scope_id, ScopeId}, prelude::{current_scope_id, ScopeId},
VirtualDom, use_hook, VirtualDom,
}; };
use dioxus_interpreter_js::binary_protocol::Channel; use dioxus_interpreter_js::binary_protocol::Channel;
use dioxus_interpreter_js::MutationState; use dioxus_interpreter_js::MutationState;
@@ -385,7 +384,7 @@ impl WryWindowEventHandlerInner {
pub fn use_wry_event_handler( pub fn use_wry_event_handler(
handler: impl FnMut(&Event<UserWindowEvent>, &EventLoopWindowTarget<UserWindowEvent>) + 'static, handler: impl FnMut(&Event<UserWindowEvent>, &EventLoopWindowTarget<UserWindowEvent>) + 'static,
) -> WryEventHandler { ) -> WryEventHandler {
once(move || { use_hook(move || {
let desktop = window(); let desktop = window();
let id = desktop.create_wry_event_handler(handler); let id = desktop.create_wry_event_handler(handler);
-1
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 the request is asking for edits (ie binary protocol streaming, do that)
if request.uri().path().trim_matches('/') == "edits" { if request.uri().path().trim_matches('/') == "edits" {
println!("Handling edits from handler");
return edit_queue.handle_request(responder); return edit_queue.handle_request(responder);
} }