Skip to content

Commit

Permalink
Display user unique username if they have no Display Name set
Browse files Browse the repository at this point in the history
  • Loading branch information
kryksyh committed Oct 16, 2024
1 parent 74dc7b3 commit b3caccf
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions modules/sharing/mod-cloud-audiocom/ui/UserPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,16 @@ void UserPanel::UpdateUserData()
return;
}

const auto displayName = userService.GetDisplayName();
wxString displayName = userService.GetDisplayName();

if (!displayName.empty()) {
mUserName->SetLabel(displayName);
mUserImage->wxPanel::SetLabel(displayName); // for screen readers
if (displayName.empty())
{
displayName = userService.GetUserSlug();
}

mUserName->SetLabel(displayName);
mUserImage->wxPanel::SetLabel(displayName); // for screen readers

const auto avatarPath = userService.GetAvatarPath();

if (!avatarPath.empty())
Expand Down

0 comments on commit b3caccf

Please sign in to comment.