Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit a7b2ecdb authored by Thomas Surrel's avatar Thomas Surrel

[Device Notifier] Restore busy indicator

Summary:
This patch fixes two issues:
- the 'state' of the device now propagates correctly, that makes the busy indicator be displayed again, device emblems are also updated correctly
- there is no more delay between the moment when the device is actually mounted and the moment the device notifier says it is. The worst case used to be 5 seconds.

BUG: 354321
BUG: 399986

Reviewers: #plasma, #vdg, broulik, bruns, ngraham, davidedmundson

Reviewed By: #plasma, #vdg, ngraham, davidedmundson

Subscribers: mart, cfeck, ngraham, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D16170
parent e1293e4c
......@@ -119,6 +119,19 @@ MouseArea {
}
}
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 @@ MouseArea {
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 ""
......
......@@ -109,7 +109,7 @@ Item {
id: sdSource
engine: "soliddevice"
connectedSources: hpSource.sources
interval: plasmoid.expanded ? 5000 : 0
interval: 0
property string last
onSourceAdded: {
disconnectSource(source);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment