Skip to content

Commit

Permalink
Merge branch 'ST3'
Browse files Browse the repository at this point in the history
  • Loading branch information
facelessuser committed Jun 15, 2014
2 parents 2ab1138 + cb1a1b2 commit ffec861
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ThemeScheduler.py
Expand Up @@ -163,7 +163,7 @@ class ThemeScheduler(object):
@classmethod
def reset_msg_state(cls):
"""
Reset teh current state of dialogs
Reset the current state of dialogs
"""
cls.dialog_open = False

Expand Down Expand Up @@ -210,7 +210,9 @@ def update_next(cls, seconds, now):
cls.next_change = closest
elif lowest is not None:
cls.next_change = lowest
cls.day = now.day
if lowest is not None:
cls.lowest = lowest
cls.day = now.day

debug_log("%s - Next Change @ %s" % (time.ctime(), str(cls.next_change)))

Expand Down Expand Up @@ -405,8 +407,9 @@ def is_update_time(seconds, now):
not ThemeScheduler.update
):
update = (
(ThemeScheduler.day is None and seconds >= ThemeScheduler.next_change.time) or
(ThemeScheduler.day != now.day and seconds >= ThemeScheduler.next_change.time)
(ThemeScheduler.day == now.day and seconds >= ThemeScheduler.next_change.time) or
(ThemeScheduler.day != now.day and seconds >= ThemeScheduler.next_change.time) or
(ThemeScheduler.day != now.day and seconds >= ThemeScheduler.lowest.time)
)
return update

Expand Down

0 comments on commit ffec861

Please sign in to comment.