diff --git a/resources/qml/MainPage/TopToolBar.qml b/resources/qml/MainPage/TopToolBar.qml index 7a5d4e7..266f024 100644 --- a/resources/qml/MainPage/TopToolBar.qml +++ b/resources/qml/MainPage/TopToolBar.qml @@ -164,15 +164,16 @@ ToolBar { } function getLaneState(extensions) { + var batteryWarning = false; for(var i = 0; i < extensions.length; i++) { console.log(JSON.stringify(extensions[i])) if(extensions[i]["state"] !== ScStw.ExtensionConnected || extensions[i]["batteryState"] === ScStw.BatteryCritical) return 2 if(extensions[i]["batteryState"] === ScStw.BatteryWarning) - return 1 + batteryWarning = true } - return 0 + return batteryWarning ? 1:0 } Behavior on border.color {