mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 11:20:57 -06:00
UX: respect prioritize_username_in_ux
setting for user avatar title
This commit is contained in:
parent
9c930c622e
commit
8e36816bde
@ -1,6 +1,7 @@
|
||||
import { get } from "@ember/object";
|
||||
import { registerUnbound } from "discourse-common/lib/helpers";
|
||||
import { avatarImg, formatUsername } from "discourse/lib/utilities";
|
||||
import { prioritizeNameInUx } from "discourse/lib/settings";
|
||||
|
||||
let _customAvatarHelpers;
|
||||
|
||||
@ -42,7 +43,9 @@ function renderAvatar(user, options) {
|
||||
return "";
|
||||
}
|
||||
|
||||
let displayName = name || formatUsername(username);
|
||||
let displayName = prioritizeNameInUx(name, this.siteSettings)
|
||||
? name
|
||||
: formatUsername(username);
|
||||
|
||||
let title = options.title;
|
||||
if (!title && !options.ignoreTitle) {
|
||||
|
Loading…
Reference in New Issue
Block a user