improve cap

This commit is contained in:
rustdesk
2025-04-29 23:27:43 +08:00
parent f0c5580f57
commit 2864e1984a

View File

@@ -2318,7 +2318,9 @@ impl LoginConfigHandler {
display_name = crate::username(); display_name = crate::username();
} }
let display_name = display_name let display_name = display_name
.chars() .split_whitespace()
.map(|word| {
word.chars()
.enumerate() .enumerate()
.map(|(i, c)| { .map(|(i, c)| {
if i == 0 { if i == 0 {
@@ -2327,7 +2329,10 @@ impl LoginConfigHandler {
c.to_string() c.to_string()
} }
}) })
.collect::<String>(); .collect::<String>()
})
.collect::<Vec<_>>()
.join(" ");
#[cfg(not(target_os = "android"))] #[cfg(not(target_os = "android"))]
let my_platform = whoami::platform().to_string(); let my_platform = whoami::platform().to_string();
#[cfg(target_os = "android")] #[cfg(target_os = "android")]