Merge pull request #568 from RomainGehrig/master

[modules/pomodoro] Fix bug arising when the refresh interval is greater than 1s
This commit is contained in:
tobi-wan-kenobi 2020-03-04 20:56:16 +01:00 committed by GitHub
commit fc6aa3ca15
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -80,7 +80,7 @@ class Module(bumblebee.engine.Module):
self.remaining_time -= timediff self.remaining_time -= timediff
self.time = datetime.datetime.now() self.time = datetime.datetime.now()
if self.remaining_time.seconds <= 0: if self.remaining_time.total_seconds() <= 0:
self.notify() self.notify()
if self.pomodoro["type"] == "Work": if self.pomodoro["type"] == "Work":
self.pomodoro["type"] = "Break" self.pomodoro["type"] = "Break"