mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-22 11:38:57 +00:00
fix(CommunityPermissions): clean warnings by preventing assigning when some roles doesn't exist
Closes: #9608
This commit is contained in:
parent
1e7e2084a7
commit
34676d0ec7
@ -210,7 +210,7 @@ Rectangle {
|
||||
|
||||
asset.height: root.asset.height
|
||||
asset.width: root.asset.width
|
||||
asset.name: root.useLetterIdenticons ? model.text : model.imageSource
|
||||
asset.name: root.useLetterIdenticons ? model.text : (model.imageSource ?? "")
|
||||
asset.isImage: root.asset.isImage
|
||||
asset.bgColor: root.asset.bgColor
|
||||
asset.emoji: model.emoji ? model.emoji : ""
|
||||
|
@ -81,16 +81,13 @@ StatusListView {
|
||||
width: ListView.view.width
|
||||
key: model.key
|
||||
name: model.name
|
||||
shortName: !!model.shortName ? model.shortName : ""
|
||||
iconSource: model.iconSource
|
||||
shortName: model.shortName ?? ""
|
||||
iconSource: model.iconSource ?? ""
|
||||
subItems: model.subItems
|
||||
selected: root.checkedKeys.includes(model.key)
|
||||
|
||||
onItemClicked: root.itemClicked(model.key,
|
||||
model.name,
|
||||
model.shortName,
|
||||
model.iconSource,
|
||||
model.subItems)
|
||||
onItemClicked: root.itemClicked(
|
||||
key, name, shortName, iconSource, subItems)
|
||||
}
|
||||
|
||||
section.property: root.searchMode ? "" : "categoryLabel"
|
||||
|
@ -41,14 +41,14 @@ QtObject {
|
||||
function getTokenShortNameByKey(model, key) {
|
||||
const item = getTokenByKey(model, key)
|
||||
if (item)
|
||||
return item.shortName
|
||||
return item.shortName ?? ""
|
||||
return ""
|
||||
}
|
||||
|
||||
function getTokenIconByKey(model, key) {
|
||||
const item = getTokenByKey(model, key)
|
||||
if (item)
|
||||
return item.iconSource
|
||||
return item.iconSource ?? ""
|
||||
return ""
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,6 @@ StatusScrollView {
|
||||
|
||||
sourceModel: model.channelsListModel
|
||||
|
||||
|
||||
proxyRoles: [
|
||||
ExpressionRole {
|
||||
name: "imageSource"
|
||||
|
Loading…
x
Reference in New Issue
Block a user