fix: apply proxy model to collectiblesModel

This is needed to render commnity NFT artwork
This commit is contained in:
Pascal Precht 2023-03-09 17:54:44 +01:00 committed by Follow the white rabbit
parent 7aaa16a0c4
commit 2ca8fd04e2
1 changed files with 10 additions and 1 deletions

View File

@ -82,8 +82,17 @@ QtObject {
} }
} }
property var collectiblesModel: chatCommunitySectionModule.collectiblesModel property var collectiblesModel: SortFilterProxyModel {
sourceModel: chatCommunitySectionModule.collectiblesModel
proxyRoles: ExpressionRole {
function icon(icon) {
return !!icon ? icon : Style.png("tokens/DEFAULT-TOKEN")
}
name: "iconSource"
expression: icon(model.icon)
}
}
// Since qml component doesn't follow encaptulation from the backend side, we're introducing // Since qml component doesn't follow encaptulation from the backend side, we're introducing
// a method which will return appropriate chat content module for selected chat/channel // a method which will return appropriate chat content module for selected chat/channel
function currentChatContentModule(){ function currentChatContentModule(){