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 cb323798 authored by Thomas Surrel's avatar Thomas Surrel

[Device Notifier] Keep the device label & icon after unmounting

Summary:
When unmounting a device, the device notifier keeps the information
of the device and its icon for a few seconds before it disappears.
But the binding on the label and the icon was making them go blank
before, leaving an emblem without an icon and a 'This device can
now be safely removed' notice without the name of the device
(although it did not always happen, this I am not sure why).

The problem appeared with commit 61b2b173

Test Plan:
Unmount a removable device with the device notifier: for a few
seconds, the device name and icon should still be displayed

An example of the problem:
{F6442095}

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: davidedmundson, filipf, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D17127
parent 41e12944
......@@ -158,8 +158,14 @@ MouseArea {
DeviceItem {
width: notifierDialog.width
udi: DataEngineSource
icon: sdSource.data[udi] ? sdSource.data[udi].Icon : ""
deviceName: sdSource.data[udi] ? sdSource.data[udi].Description : ""
Binding on icon {
when: sdSource.data[udi] !== undefined
value: sdSource.data[udi].Icon
}
Binding on deviceName {
when: sdSource.data[udi] !== undefined
value: sdSource.data[udi].Description
}
emblemIcon: Emblems && Emblems[0] ? Emblems[0] : ""
state: sdSource.data[udi] ? sdSource.data[udi].State : 0
......
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