patch name
This commit is contained in:
parent
a5b2c2702c
commit
7ce0fb3cd3
@ -27,26 +27,26 @@ struct SearchProfile: Decodable {
|
|||||||
|
|
||||||
extension UserSearchResult {
|
extension UserSearchResult {
|
||||||
var displayName: String {
|
var displayName: String {
|
||||||
if let custom = preferredCustomName {
|
|
||||||
return custom
|
|
||||||
}
|
|
||||||
if let official = officialFullName {
|
if let official = officialFullName {
|
||||||
return official
|
return official
|
||||||
}
|
}
|
||||||
if let profileCustom = trimmed(profile?.customName) {
|
if let custom = preferredCustomName {
|
||||||
return profileCustom
|
return custom
|
||||||
}
|
}
|
||||||
if let profileFull = trimmed(profile?.fullName) {
|
if let profileFull = trimmed(profile?.fullName) {
|
||||||
return profileFull
|
return profileFull
|
||||||
}
|
}
|
||||||
|
if let profileCustom = trimmed(profile?.customName) {
|
||||||
|
return profileCustom
|
||||||
|
}
|
||||||
return loginHandle
|
return loginHandle
|
||||||
}
|
}
|
||||||
|
|
||||||
var secondaryText: String? {
|
var secondaryText: String? {
|
||||||
// Отдельное поле для совместимости с существующими вызовами
|
// Отдельное поле для совместимости с существующими вызовами
|
||||||
if let official = officialFullName, official != displayName {
|
// if let official = officialFullName, official != displayName {
|
||||||
return official
|
// return official
|
||||||
}
|
// }
|
||||||
if let profileLogin = trimmed(profile?.login), profileLogin != login {
|
if let profileLogin = trimmed(profile?.login), profileLogin != login {
|
||||||
return "@\(profileLogin)"
|
return "@\(profileLogin)"
|
||||||
}
|
}
|
||||||
@ -67,9 +67,9 @@ extension UserSearchResult {
|
|||||||
|
|
||||||
var secondaryLabelForSearch: String? {
|
var secondaryLabelForSearch: String? {
|
||||||
if let official = officialFullName {
|
if let official = officialFullName {
|
||||||
if let custom = preferredCustomName, custom != official {
|
// if let custom = preferredCustomName, custom != official {
|
||||||
return custom
|
// return custom
|
||||||
}
|
// }
|
||||||
if official != loginHandle {
|
if official != loginHandle {
|
||||||
return loginHandle
|
return loginHandle
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user