apps: alarm: avoid setting a "silly" alarm during app init
The alarm is off by default so there's no reason to set an alarm that is disabled. Let's stop doing that. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
This commit is contained in:
parent
2641616ff6
commit
f19188b962
1 changed files with 2 additions and 3 deletions
|
@ -55,14 +55,13 @@ class AlarmApp():
|
|||
self.hours = 0
|
||||
self.minutes = 0
|
||||
|
||||
self._set_current_alarm()
|
||||
|
||||
def foreground(self):
|
||||
"""Activate the application."""
|
||||
self._draw()
|
||||
wasp.system.request_event(wasp.EventMask.TOUCH)
|
||||
wasp.system.request_tick(1000)
|
||||
wasp.system.cancel_alarm(self.current_alarm, self._alert)
|
||||
if self.active.state:
|
||||
wasp.system.cancel_alarm(self.current_alarm, self._alert)
|
||||
|
||||
def background(self):
|
||||
"""De-activate the application."""
|
||||
|
|
Loading…
Add table
Reference in a new issue