mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +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:
@@ -7,9 +7,10 @@ BatteryTimer::BatteryTimer(AppsContainer * container) :
|
||||
{
|
||||
}
|
||||
|
||||
void BatteryTimer::fire() {
|
||||
m_container->updateBatteryState();
|
||||
bool BatteryTimer::fire() {
|
||||
bool needRedrawing = m_container->updateBatteryState();
|
||||
if (Ion::Battery::level() == Ion::Battery::Charge::EMPTY) {
|
||||
m_container->shutdownDueToLowBattery();
|
||||
}
|
||||
return needRedrawing;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user