Fix things info for Zigbee nodes with multiple things

pull/891/head
Michael Zanetti 2022-09-24 13:26:24 +02:00
parent a54dd4d757
commit 19130dab77
1 changed files with 3 additions and 13 deletions

View File

@ -271,7 +271,7 @@ SettingsPageBase {
if (destinationThings.count == 1) {
ret += " (" + destinationThings.get(0).name + ")"
} else if (destinationThings.count > 1) {
ret += " (" + destinationThing.count + " things)"
ret += " (" + destinationThings.count + " things)"
}
return ret
@ -455,16 +455,6 @@ SettingsPageBase {
}
}
}
// displayText: currentDestinationNodeThings.count > 0
// ? currentDestinationNodeThings.get(0).name
// : currentNode == root.coordinatorNode
// ? Configuration.systemName
// : currentNode.model
// ThingsProxy {
// id: currentDestinationNodeThings
// engine: _engine
// paramsFilter: {"ieeeAddress": destinationNodeComboBox.currentNode.ieeeAddress}
// }
delegate: NymeaItemDelegate {
id: destinationNodeDelegate
property ZigbeeNode node: network.nodes.get(index)
@ -480,8 +470,8 @@ SettingsPageBase {
? qsTr("Coordinator")
: destinationNodeThings.count == 1
? nodeThing.name
: nodeThings.count > 1
? qsTr("%1 things").arg(nodeThings.count)
: destinationNodeThings.count > 1
? qsTr("%1 things").arg(destinationNodeThings.count)
: qsTr("Unrecognized device")
progressive: false