fix(UserOverview): better display name detection
Signed-off-by: Infi <infi@infi.sh>
This commit is contained in:
parent
c6cd473bd5
commit
a9e22bcb98
|
|
@ -165,7 +165,10 @@ fun RawUserOverview(
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
text = AnnotatedString.Builder().apply {
|
text = AnnotatedString.Builder().apply {
|
||||||
if (user.displayName != null) {
|
// make sure
|
||||||
|
// - the display name is not null or blank
|
||||||
|
// - the display name is not the same as the username; both trimmed
|
||||||
|
if (!user.displayName.isNullOrBlank() && ((user.displayName.trim() == user.username?.trim()) == false)) {
|
||||||
pushStyle(SpanStyle(fontWeight = FontWeight.Bold))
|
pushStyle(SpanStyle(fontWeight = FontWeight.Bold))
|
||||||
append(user.displayName)
|
append(user.displayName)
|
||||||
pop()
|
pop()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue