mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps] Return boolean when charging state or charge level has changed
(to know if the redrawing is necessary) Change-Id: Iebb1d2ba1f188815b01bcbd6e632244f6169b3f9
This commit is contained in:
@@ -18,18 +18,22 @@ BatteryView::BatteryView() :
|
||||
{
|
||||
}
|
||||
|
||||
void BatteryView::setChargeState(Ion::Battery::Charge chargeState) {
|
||||
bool BatteryView::setChargeState(Ion::Battery::Charge chargeState) {
|
||||
if (chargeState != m_chargeState) {
|
||||
m_chargeState = chargeState;
|
||||
markRectAsDirty(bounds());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void BatteryView::setIsCharging(bool isCharging) {
|
||||
bool BatteryView::setIsCharging(bool isCharging) {
|
||||
if (m_isCharging != isCharging) {
|
||||
m_isCharging = isCharging;
|
||||
markRectAsDirty(bounds());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
KDColor s_flashWorkingBuffer[BatteryView::k_flashHeight*BatteryView::k_flashWidth];
|
||||
|
||||
Reference in New Issue
Block a user