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::() }) - .collect::(); + .collect::>() + .join(" "); #[cfg(not(target_os = "android"))] let my_platform = whoami::platform().to_string(); #[cfg(target_os = "android")]