[apps] In USB timer, change color only when USB state has changed

Change-Id: I1ded3b149fd1987589566191f70d0ace992775f5
This commit is contained in:
Émilie Feral
2017-04-21 16:16:28 +02:00
parent 0f51bc19a7
commit 6952c8a799

View File

@@ -18,7 +18,9 @@ void USBTimer::fire() {
Ion::LED::setColor(LEDColor);
m_previousPluggedState = true;
} else {
Ion::LED::setColor(KDColorBlack);
m_previousPluggedState = false;
if (m_previousPluggedState) {
Ion::LED::setColor(KDColorBlack);
m_previousPluggedState = false;
}
}
}