Commit 4f636c27 authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Update RocketChatUserAvatar.kt

parent 281ac8a3
......@@ -69,7 +69,11 @@ object RocketChatUserAvatar {
if (splitUsername.size > 1) {
return (splitUsername[0].substring(0, 1) + splitUsername[splitUsername.size - 1].substring(0, 1)).toUpperCase()
} else {
return username.toUpperCase()
if (username.length > 1) {
return username.substring(0, 2).toUpperCase()
} else {
return username.substring(0, 1).toUpperCase()
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment