Skip to content

An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.

improve cap

rustdesk2864e1984a79
diff --git a/src/client.rs b/src/client.rs
index 3c3850d0a..0019bb975 100644
--- a/src/client.rs
+++ b/src/client.rs
@@ -2318,16 +2318,21 @@ impl LoginConfigHandler {
display_name = crate::username();
}
let display_name = display_name
- .chars()
- .enumerate()
- .map(|(i, c)| {
- if i == 0 {
- c.to_uppercase().to_string()
- } else {
- c.to_string()
- }
+ .split_whitespace()
+ .map(|word| {
+ word.chars()
+ .enumerate()
+ .map(|(i, c)| {
+ if i == 0 {
+ c.to_uppercase().to_string()
+ } else {
+ c.to_string()
+ }
+ })
+ .collect::<String>()
})
- .collect::<String>();
+ .collect::<Vec<_>>()
+ .join(" ");
#[cfg(not(target_os = "android"))]
let my_platform = whoami::platform().to_string();
#[cfg(target_os = "android")]