File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
app/src/main/java/org/thoughtcrime/securesms/util Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ class UserProfileUtils @AssistedInject constructor(
91
91
isResolvedBlinded -> {
92
92
" ${address.substring(0 , 23 )} \n ${address.substring(23 , 46 )} \n ${address.substring(46 )} " to
93
93
Phrase .from(context, R .string.tooltipAccountIdVisible)
94
- .put(NAME_KEY , recipient.name)
94
+ .put(NAME_KEY , truncateName( recipient.name) )
95
95
.format()
96
96
}
97
97
@@ -119,6 +119,14 @@ class UserProfileUtils @AssistedInject constructor(
119
119
120
120
}
121
121
122
+ private fun truncateName (name : String ): String {
123
+ return if (name.length > 10 ) {
124
+ name.take(10 ) + " …"
125
+ } else {
126
+ name
127
+ }
128
+ }
129
+
122
130
fun onCommand (command : UserProfileModalCommands ){
123
131
when (command){
124
132
UserProfileModalCommands .ShowProCTA -> {
You can’t perform that action at this time.
0 commit comments