feat(HoldingsDropdown): Open list of all tokens by default when no own/community tokens

This commit is contained in:
Michał Cieślak 2023-03-24 14:54:58 +01:00 committed by Michał
parent 5b9017757f
commit 2f3392c7d5
1 changed files with 16 additions and 0 deletions

View File

@ -273,6 +273,22 @@ StatusDropdown {
type: d.extendedDropdownType type: d.extendedDropdownType
showAllTokensMode: d.allTokensMode showAllTokensMode: d.allTokensMode
Binding on showAllTokensMode {
value: true
when: d.extendedDropdownType === ExtendedDropdownContent.Type.Assets
&& root.assetsModel.rowCount() > 0
&& ModelUtils.get(root.assetsModel, 0, "category") === TokenCategories.Category.General
}
Binding on showAllTokensMode {
value: true
when: d.extendedDropdownType === ExtendedDropdownContent.Type.Collectibles
&& root.collectiblesModel.rowCount() > 0
&& ModelUtils.get(root.collectiblesModel, 0, "category") === TokenCategories.Category.General
}
onTypeChanged: forceActiveFocus() onTypeChanged: forceActiveFocus()
onItemClicked: { onItemClicked: {