use preferredDisplayName and preferredPubKey from proxyRole
This commit is contained in:
parent
5cf658b8d6
commit
c13a63cbd4
|
@ -90,14 +90,24 @@ Item {
|
||||||
model: SortFilterProxyModel {
|
model: SortFilterProxyModel {
|
||||||
sourceModel: root.usersModel
|
sourceModel: root.usersModel
|
||||||
|
|
||||||
proxyRoles: FastExpressionRole {
|
proxyRoles: [
|
||||||
|
FastExpressionRole {
|
||||||
function displayNameProxy(nickname, ensName, displayName, aliasName) {
|
function displayNameProxy(nickname, ensName, displayName, aliasName) {
|
||||||
return ProfileUtils.displayName(nickname, ensName, displayName, aliasName)
|
return ProfileUtils.displayName(nickname, ensName, displayName, aliasName)
|
||||||
}
|
}
|
||||||
name: "preferredDisplayName"
|
name: "preferredDisplayName"
|
||||||
expectedRoles: ["localNickname", "ensName", "displayName", "alias"]
|
expectedRoles: ["localNickname", "ensName", "displayName", "alias"]
|
||||||
expression: displayNameProxy(model.localNickname, model.ensName, model.displayName, model.alias)
|
expression: displayNameProxy(model.localNickname, model.ensName, model.displayName, model.alias)
|
||||||
|
},
|
||||||
|
FastExpressionRole {
|
||||||
|
function pubKeyProxy(ensVerified, pubKey) {
|
||||||
|
return ensVerified ? "" : Utils.getCompressedPk(pubKey)
|
||||||
}
|
}
|
||||||
|
name: "preferredPubKey"
|
||||||
|
expectedRoles: ["ensVerified", "pubKey"]
|
||||||
|
expression: pubKeyProxy(model.ensVerified, model.pubKey)
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
sorters: [
|
sorters: [
|
||||||
RoleSorter {
|
RoleSorter {
|
||||||
|
@ -115,8 +125,8 @@ Item {
|
||||||
delegate: StatusMemberListItem {
|
delegate: StatusMemberListItem {
|
||||||
width: ListView.view.width
|
width: ListView.view.width
|
||||||
nickName: model.localNickname
|
nickName: model.localNickname
|
||||||
userName: ProfileUtils.displayName("", model.ensName, model.displayName, model.alias)
|
userName: model.preferredDisplayName
|
||||||
pubKey: model.isEnsVerified ? "" : Utils.getCompressedPk(model.pubKey)
|
pubKey: model.preferredPubKey
|
||||||
isContact: model.isContact
|
isContact: model.isContact
|
||||||
isVerified: model.isVerified
|
isVerified: model.isVerified
|
||||||
isUntrustworthy: model.isUntrustworthy
|
isUntrustworthy: model.isUntrustworthy
|
||||||
|
|
Loading…
Reference in New Issue