Fix cover updates

This commit is contained in:
Matti Viljanen 2019-02-10 20:27:27 +02:00
parent 2074f412b3
commit 51f2542d80
No known key found for this signature in database
GPG key ID: CF32A1495158F888

View file

@ -28,8 +28,10 @@ CoverBackground {
y: coverPage.width * 0.25
width: 0.4 * coverPage.width
onChargingChanged: onChargeChanged()
onChargeChanged: {
onStateChanged: { updateView() }
onChargingChanged: { updateView() }
onChargeChanged: { updateView() }
function updateView() {
if(charge <= settings.lowerLimit && battery.state === "discharging") {
coverText.text = qsTr("Connect\ncharger")
}