1
0
Evan Almloff 1 жил өмнө
parent
commit
9133c0a305

+ 2 - 3
packages/desktop/src/desktop_context.rs

@@ -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);

+ 0 - 1
packages/desktop/src/protocol.rs

@@ -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);
     }