diff --git a/src/ui_cm_interface.rs b/src/ui_cm_interface.rs index d1c1d21ef..d6792c111 100644 --- a/src/ui_cm_interface.rs +++ b/src/ui_cm_interface.rs @@ -772,10 +772,7 @@ impl IpcTaskRunner { #[tokio::main(flavor = "current_thread")] pub async fn start_ipc(cm: ConnectionManager) { #[cfg(target_os = "windows")] - ContextSend::enable(option2bool( - OPTION_ENABLE_FILE_TRANSFER, - &Config::get_option(OPTION_ENABLE_FILE_TRANSFER), - )); + ContextSend::enable(crate::Connection::permission(OPTION_ENABLE_FILE_TRANSFER)); match ipc::new_listener("_cm").await { Ok(mut incoming) => { while let Some(result) = incoming.next().await { diff --git a/src/ui_interface.rs b/src/ui_interface.rs index 516e4fede..549337aea 100644 --- a/src/ui_interface.rs +++ b/src/ui_interface.rs @@ -1167,6 +1167,8 @@ async fn check_connect_status_(reconnect: bool, rx: mpsc::UnboundedReceiver Some(true), + "view" => Some(false), + _ => None, + }; + let enabled = access_mode_enabled.unwrap_or(config::option2bool(OPTION_ENABLE_FILE_TRANSFER, &ft)); + clipboard::ContextSend::enable(enabled); + enable_file_transfer = ft; + access_mode = am; } } }