Fix hiding the EnergyView configuration button if there's nothing to configure

This commit is contained in:
Michael Zanetti 2022-07-25 16:58:48 +02:00
parent 3a64d41c4a
commit ed28b21907

View File

@ -51,7 +51,7 @@ MainViewBase {
trigger: function() {
pageStack.push("energy/EnergySettingsPage.qml", {energyManager: energyManager});
},
visible: energyMeters.count > 1 || allConsumers.count > 0
visible: energyMeters.count > 1 || allConsumers.count - Math.min(energyMeters.count, 1) > 0
}
]