[DeviceNotifications] Keep last message for each device

Authored by bruns on Jul 6 2019, 6:28 PM.

Description

[DeviceNotifications] Keep last message for each device

Summary:
Ejecting e.g. a USB stick removes it from the bus (bus power is removed),
but the last notification should be kept, otherwise a message like
"The device can be savely removed" immediately disappears.

Unfortunately it is almost impossible to tell when a device has been
physically removed (only indirectly, when a new device is plugged into
the same port), so allow some small leakage - in case the same device is
later replugged, no leakage happens.

Test Plan:
Card reader:
1.insert medium, mount, unmount

-> message "Device can be savely removed" is shown in device notifier

for 5 seconds

  1. eject medium, reinsert -> device appears without message and with default label

Reviewers: Plasma, broulik, ngraham

Reviewed By: ngraham

Subscribers: plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D22312

Details

Committed
brunsJul 7 2019, 7:13 PM
Reviewer
ngraham
Differential Revision
D22312: [DeviceNotifications] Keep last message for each device
Parents
R120:2594eb1b33b5: Revert "Fix system tray UI/UX & refactor"
Branches
Unknown
Tags
Unknown