From 6445d2dc590e3e876c3ac7219c8b66f766aa1d0b Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Sun, 20 Dec 2020 14:19:42 +0100 Subject: [PATCH] Fix erraneously displayed powet switch in generic list page --- .../ui/devicelistpages/GenericDeviceListPage.qml | 14 -------------- nymea-app/ui/devicepages/ButtonDevicePage.qml | 2 +- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/nymea-app/ui/devicelistpages/GenericDeviceListPage.qml b/nymea-app/ui/devicelistpages/GenericDeviceListPage.qml index 02d5c402..1a2bfea6 100644 --- a/nymea-app/ui/devicelistpages/GenericDeviceListPage.qml +++ b/nymea-app/ui/devicelistpages/GenericDeviceListPage.qml @@ -107,20 +107,6 @@ DeviceListPageBase { ThingStatusIcons { thing: itemDelegate.thing } - - Switch { - visible: itemDelegate.powerState !== null - checked: itemDelegate.powerState && itemDelegate.powerState.value === true - enabled: itemDelegate.isEnabled - onClicked: { - var params = []; - var param1 = {}; - param1["paramTypeId"] = itemDelegate.powerState.stateTypeId; - param1["value"] = checked; - params.push(param1) - engine.deviceManager.executeAction(itemDelegate.thing.id, itemDelegate.powerState.stateTypeId, params) - } - } } } } diff --git a/nymea-app/ui/devicepages/ButtonDevicePage.qml b/nymea-app/ui/devicepages/ButtonDevicePage.qml index 0b41ac3a..1265bb64 100644 --- a/nymea-app/ui/devicepages/ButtonDevicePage.qml +++ b/nymea-app/ui/devicepages/ButtonDevicePage.qml @@ -44,7 +44,7 @@ DevicePageBase { title: qsTr("This switch has not been used yet.") text: qsTr("Press a button on the switch to see logs appearing here.") - visible: logView.logsModel.count === 0 + visible: !logsModel.busy && logsModel.count === 0 buttonVisible: false imageSource: "../images/system-shutdown.svg" }