Commit e22f0c90 authored by Nate Graham's avatar Nate Graham 🔩
Browse files

[applets/devicenotifier] Don't open popup for already-connected devices

The old applet only opened the popup when a new device was attached
after the applet was loaded, not if there was already a device attached
when the applet was loaded. This commit brings back the old behavior by
re-using the approach taken in the old applet.

BUG: 426990
FIXED-IN: 5.20


(cherry picked from commit 7f5339cb)
parent 3cea9e73
......@@ -122,9 +122,6 @@ Item {
if (data[source].Removable) {
devicenotifier.connectedRemovables.push(source);
devicenotifier.connectedRemovables = devicenotifier.connectedRemovables;
devicenotifier.popupIcon = "preferences-desktop-notification";
expandTimer.restart();
popupIconTimer.restart()
}
}
......@@ -171,7 +168,10 @@ Item {
function processLastDevice(expand) {
if (last) {
if (isViableDevice(last)) {
if (isViableDevice(last) && hpSource.data[last].added) {
devicenotifier.popupIcon = "preferences-desktop-notification";
expandTimer.restart();
popupIconTimer.restart()
last = "";
}
}
......
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