mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[apps] Timers access the shared container directly
This commit is contained in:
committed by
EmilieNumworks
parent
652cbae9ac
commit
5548767809
@@ -1,16 +1,16 @@
|
||||
#include "battery_timer.h"
|
||||
#include "apps_container.h"
|
||||
|
||||
BatteryTimer::BatteryTimer(AppsContainer * container) :
|
||||
Timer(1),
|
||||
m_container(container)
|
||||
BatteryTimer::BatteryTimer() :
|
||||
Timer(1)
|
||||
{
|
||||
}
|
||||
|
||||
bool BatteryTimer::fire() {
|
||||
bool needRedrawing = m_container->updateBatteryState();
|
||||
AppsContainer * container = AppsContainer::sharedAppsContainer();
|
||||
bool needRedrawing = container->updateBatteryState();
|
||||
if (Ion::Battery::level() == Ion::Battery::Charge::EMPTY) {
|
||||
m_container->shutdownDueToLowBattery();
|
||||
container->shutdownDueToLowBattery();
|
||||
}
|
||||
return needRedrawing;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user