mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-08-29 07:16:08 +00:00
fix missing file (#335)
This commit is contained in:
parent
63d6649ab4
commit
7f4bd96739
12
app/src/main/java/com/bitchat/android/ui/ChatUIConstants.kt
Normal file
12
app/src/main/java/com/bitchat/android/ui/ChatUIConstants.kt
Normal file
@ -0,0 +1,12 @@
|
||||
package com.bitchat.android.ui
|
||||
|
||||
/**
|
||||
* UI constants/utilities for nickname rendering.
|
||||
*/
|
||||
const val MAX_NICKNAME_LENGTH: Int = 15
|
||||
|
||||
fun truncateNickname(name: String, maxLen: Int = MAX_NICKNAME_LENGTH): String {
|
||||
return if (name.length <= maxLen) name else name.take(maxLen)
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user