switch sides: windows

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-01-17 21:43:39 +08:00
parent e57949d472
commit c25796e44d
5 changed files with 27 additions and 24 deletions

View File

@@ -1573,8 +1573,16 @@ impl Connection {
},
#[cfg(feature = "flutter")]
Some(misc::Union::SwitchSidesRequest(s)) => {
crate::flutter::switch_sides(&self.lr.my_id, &s.uuid);
return false;
if let Ok(uuid) = uuid::Uuid::from_slice(&s.uuid.to_vec()[..]) {
crate::run_me(vec![
"--connect",
&self.lr.my_id,
"--switch_uuid",
uuid.to_string().as_ref(),
])
.ok();
return false;
}
}
_ => {}
},