diff --git a/applets/devicenotifier/package/contents/ui/DeviceItem.qml b/applets/devicenotifier/package/contents/ui/DeviceItem.qml --- a/applets/devicenotifier/package/contents/ui/DeviceItem.qml +++ b/applets/devicenotifier/package/contents/ui/DeviceItem.qml @@ -119,6 +119,19 @@ } } + Timer { + id: updateStorageSpaceTimer + interval: 5000 + repeat: true + running: mounted && plasmoid.expanded + triggeredOnStart: true // Update the storage space as soon as we open the plasmoid + onTriggered: { + var service = sdSource.serviceForSource(udi); + var operation = service.operationDescription("updateFreespace"); + service.startOperationCall(operation); + } + } + RowLayout { id: row anchors.horizontalCenter: parent.horizontalCenter @@ -239,8 +252,6 @@ font.pointSize: theme.smallestFont.pointSize visible: deviceItem.state != 0 || (!actionsList.visible && !deviceItem.hasMessage) text: { - // FIXME: state changes do not reach the plasmoid if the - // device was already attached when the plasmoid was initialized if (deviceItem.state == 0) { if (!hpSource.data[udi]) { return "" diff --git a/applets/devicenotifier/package/contents/ui/devicenotifier.qml b/applets/devicenotifier/package/contents/ui/devicenotifier.qml --- a/applets/devicenotifier/package/contents/ui/devicenotifier.qml +++ b/applets/devicenotifier/package/contents/ui/devicenotifier.qml @@ -109,7 +109,7 @@ id: sdSource engine: "soliddevice" connectedSources: hpSource.sources - interval: plasmoid.expanded ? 5000 : 0 + interval: 0 property string last onSourceAdded: { disconnectSource(source);