mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-07-25 01:05:20 +00:00
fix missing file (#335)
This commit is contained in:
@@ -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)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user