Apply patch for battery notification spam. (#607)

Raised in #578.
This commit is contained in:
Facetoe 2017-09-20 00:37:22 +08:00 committed by GitHub
parent 455053d721
commit 27519031fe

View File

@ -345,7 +345,7 @@ class BatteryChecker(IntervalModule):
if self.alert and fdict["status"] == "DIS" and fdict["percentage"] <= self.alert_percentage:
title, body = formatp(self.alert_format_title, **fdict), formatp(self.alert_format_body, **fdict)
if not self.notification:
if self.notification is None:
self.notification = DesktopNotification(
title=title,
body=body,