fix(battery): Prevent broadcast if values are unchanged

This commit is contained in:
Michael Carlberg 2016-06-14 05:24:56 +02:00
parent d0e12fdcd0
commit ea15f4a5de

View File

@ -142,6 +142,9 @@ bool BatteryModule::on_event(InotifyEvent *event)
state = STATE_FULL;
}
if (this->state == state && this->percentage == percentage)
return false;
if (!this->label_charging_tokenized)
this->label_charging_tokenized = this->label_charging->clone();
if (!this->label_discharging_tokenized)