From 51f2542d80ef1bf67f52917bd3f033d753831ebf Mon Sep 17 00:00:00 2001 From: Matti Viljanen Date: Sun, 10 Feb 2019 20:27:27 +0200 Subject: [PATCH] Fix cover updates --- qml/cover/CoverPage.qml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qml/cover/CoverPage.qml b/qml/cover/CoverPage.qml index 20b6673..38116d3 100644 --- a/qml/cover/CoverPage.qml +++ b/qml/cover/CoverPage.qml @@ -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") }