From 691df84efa16e38a4cca16878e4de9d6f6daba82 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Tue, 8 Sep 2020 00:04:55 +0200 Subject: [PATCH] Fix icons in ThingDelegate --- nymea-app/ui/delegates/ThingDelegate.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nymea-app/ui/delegates/ThingDelegate.qml b/nymea-app/ui/delegates/ThingDelegate.qml index e0d7aac3..3f5abec5 100644 --- a/nymea-app/ui/delegates/ThingDelegate.qml +++ b/nymea-app/ui/delegates/ThingDelegate.qml @@ -73,12 +73,12 @@ NymeaListItemDelegate { property Device device: null property Thing thing: device - readonly property bool hasBatteryInterface: thing && thing.thingClass.interfaces.indexOf("battery") > 0 + readonly property bool hasBatteryInterface: thing && thing.thingClass.interfaces.indexOf("battery") >= 0 readonly property StateType batteryCriticalStateType: hasBatteryInterface ? thing.thingClass.stateTypes.findByName("batteryCritical") : null readonly property State batteryCriticalState: batteryCriticalStateType ? thing.states.getState(batteryCriticalStateType.id) : null readonly property bool batteryCritical: batteryCriticalState && batteryCriticalState.value === true - readonly property bool hasConnectableInterface: thing && thing.thingClass.interfaces.indexOf("connectable") > 0 + readonly property bool hasConnectableInterface: thing && thing.thingClass.interfaces.indexOf("connectable") >= 0 readonly property StateType connectedStateType: hasConnectableInterface ? thing.thingClass.stateTypes.findByName("connected") : null readonly property State connectedState: connectedStateType ? thing.states.getState(connectedStateType.id) : null readonly property bool disconnected: connectedState && connectedState.value === false ? true : false