flutter_desktop: fix peer page bugs

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2022-09-01 06:18:29 -07:00
parent ec02f9e721
commit 9085a93888
9 changed files with 208 additions and 183 deletions

View File

@@ -1278,11 +1278,11 @@ impl LoginConfigHandler {
///
/// * `username` - The name of the peer.
/// * `pi` - The peer info.
pub fn handle_peer_info(&mut self, pi: PeerInfo) {
pub fn handle_peer_info(&mut self, pi: &PeerInfo) {
if !pi.version.is_empty() {
self.version = hbb_common::get_version_number(&pi.version);
}
self.features = pi.features.into_option();
self.features = pi.features.clone().into_option();
let serde = PeerInfoSerde {
username: pi.username.clone(),
hostname: pi.hostname.clone(),