fix(UserListPanel): use new `FastExpressionRole` (#13299)

This commit is contained in:
Igor Sirotin 2024-03-14 15:23:58 +00:00 committed by GitHub
parent 7be70ff010
commit da4105784a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,7 @@
import QtQuick 2.13 import QtQuick 2.13
import QtQuick.Controls 2.13 import QtQuick.Controls 2.13
import StatusQ 0.1
import StatusQ.Core 0.1 import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1 import StatusQ.Core.Theme 0.1
import StatusQ.Components 0.1 import StatusQ.Components 0.1
@ -60,11 +61,12 @@ Item {
model: SortFilterProxyModel { model: SortFilterProxyModel {
sourceModel: root.usersModel sourceModel: root.usersModel
proxyRoles: ExpressionRole { 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"]
expression: displayNameProxy(model.localNickname, model.ensName, model.displayName, model.alias) expression: displayNameProxy(model.localNickname, model.ensName, model.displayName, model.alias)
} }