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(
9191 isResolvedBlinded -> {
9292 " ${address.substring(0 , 23 )} \n ${address.substring(23 , 46 )} \n ${address.substring(46 )} " to
9393 Phrase .from(context, R .string.tooltipAccountIdVisible)
94- .put(NAME_KEY , recipient.name)
94+ .put(NAME_KEY , truncateName( recipient.name) )
9595 .format()
9696 }
9797
@@ -119,6 +119,14 @@ class UserProfileUtils @AssistedInject constructor(
119119
120120 }
121121
122+ private fun truncateName (name : String ): String {
123+ return if (name.length > 10 ) {
124+ name.take(10 ) + " …"
125+ } else {
126+ name
127+ }
128+ }
129+
122130 fun onCommand (command : UserProfileModalCommands ){
123131 when (command){
124132 UserProfileModalCommands .ShowProCTA -> {
You can’t perform that action at this time.
0 commit comments