From 9ed249966677287fe6e51cf115efff19e5e4680a Mon Sep 17 00:00:00 2001 From: fufesou <13586388+fufesou@users.noreply.github.com> Date: Wed, 25 Dec 2024 15:18:06 +0800 Subject: [PATCH] fix: file clipboard, init disabled (#10361) Signed-off-by: fufesou --- src/client/io_loop.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/client/io_loop.rs b/src/client/io_loop.rs index cbef0d914..24cc60eb4 100644 --- a/src/client/io_loop.rs +++ b/src/client/io_loop.rs @@ -310,6 +310,12 @@ impl Remote { Ok(()) }); } + + // It's better to check if the peers are windows, but it's not necessary. + #[cfg(feature = "flutter")] + if !crate::flutter::sessions::has_sessions_running(ConnType::DEFAULT_CONN) { + ContextSend::enable(false); + } } #[cfg(any(target_os = "windows", target_os = "linux", target_os = "macos"))] @@ -1199,6 +1205,7 @@ impl Remote { let peer_platform = pi.platform.clone(); self.set_peer_info(&pi); self.handler.handle_peer_info(pi); + #[cfg(not(feature = "flutter"))] self.check_clipboard_file_context(); if !(self.handler.is_file_transfer() || self.handler.is_port_forward()) { #[cfg(feature = "flutter")] @@ -1898,6 +1905,7 @@ impl Remote { true } + #[cfg(not(feature = "flutter"))] fn check_clipboard_file_context(&self) { #[cfg(any( target_os = "windows",