fix(UserOverview): better display name detection

Signed-off-by: Infi <infi@infi.sh>
This commit is contained in:
Infi 2025-06-28 03:14:41 +02:00
parent c6cd473bd5
commit a9e22bcb98
1 changed files with 4 additions and 1 deletions

View File

@ -165,7 +165,10 @@ fun RawUserOverview(
Text(
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))
append(user.displayName)
pop()