mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-06-22 10:02:20 +00:00
fix(iOS): preserve local pasteboard sync from Windows hosts (#14659)
* fix(ios): accept windows clipboard updates locally Signed-off-by: Rafal <mrsikorarafal@gmail.com> * docs: document clipboard text helpers * fix(iOS): sync clipboard, debug Signed-off-by: fufesou <linlong1266@gmail.com> --------- Signed-off-by: Rafal <mrsikorarafal@gmail.com> Signed-off-by: fufesou <linlong1266@gmail.com> Co-authored-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
parent
1e6a3dc644
commit
99b565ef40
1 changed files with 17 additions and 0 deletions
|
|
@ -1448,6 +1448,23 @@ impl<T: InvokeUiSession> Remote<T> {
|
|||
if !self.handler.lc.read().unwrap().disable_clipboard.v {
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
update_clipboard(_mcb.clipboards, ClipboardSide::Client);
|
||||
#[cfg(target_os = "ios")]
|
||||
{
|
||||
if let Some(cb) = _mcb
|
||||
.clipboards
|
||||
.iter()
|
||||
.find(|c| c.format.enum_value() == Ok(ClipboardFormat::Text))
|
||||
{
|
||||
let content = if cb.compress {
|
||||
hbb_common::compress::decompress(&cb.content)
|
||||
} else {
|
||||
cb.content.to_vec()
|
||||
};
|
||||
if let Ok(content) = String::from_utf8(content) {
|
||||
self.handler.clipboard(content);
|
||||
}
|
||||
}
|
||||
}
|
||||
#[cfg(target_os = "android")]
|
||||
crate::clipboard::handle_msg_multi_clipboards(_mcb);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue