mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-26 17:20:53 +01:00
[escher] Fix bug: do not redraw window at each timer fire but only for
timer requiring redraw Change-Id: Ia39a35185a4836809970f5ba77cc76a8b2e6ee26
This commit is contained in:
@@ -9,10 +9,12 @@ USBTimer::USBTimer(AppsContainer * container) :
|
||||
{
|
||||
}
|
||||
|
||||
void USBTimer::fire() {
|
||||
bool USBTimer::fire() {
|
||||
bool needRedrawing = false;
|
||||
if (Ion::USB::isPlugged()) {
|
||||
if (!m_previousPluggedState && GlobalPreferences::sharedGlobalPreferences()->examMode() == GlobalPreferences::ExamMode::Activate) {
|
||||
m_container->displayExamModePopUp(false);
|
||||
needRedrawing = true;
|
||||
}
|
||||
#if LED_WHILE_CHARGING
|
||||
KDColor LEDColor = Ion::Battery::isCharging() ? KDColorYellow : KDColorGreen;
|
||||
@@ -27,4 +29,5 @@ void USBTimer::fire() {
|
||||
m_previousPluggedState = false;
|
||||
}
|
||||
}
|
||||
return needRedrawing;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user