Fixed a bug where the battery alert would be displayed while charging

This commit is contained in:
enkore 2013-04-09 16:29:37 +02:00
parent 3c954f279b
commit d3c310e885

View File

@ -155,7 +155,7 @@ class BatteryChecker(IntervalModule):
else: else:
fdict["status"] = "FULL" fdict["status"] = "FULL"
if self.alert and fdict["percentage"] <= self.alert_percentage: if self.alert and fdict["status"] == "DIS" and fdict["percentage"] <= self.alert_percentage:
display_notification( display_notification(
title=self.alert_format_title.format(**fdict), title=self.alert_format_title.format(**fdict),
body=self.alert_format_body.format(**fdict), body=self.alert_format_body.format(**fdict),