[F] Add debug alarm with lastActivate one minutes prior

This commit is contained in:
Hykilpikonna
2021-01-17 16:38:51 -05:00
parent 2c5f28c97b
commit a57ab9c2f8
+2 -6
View File
@@ -63,15 +63,11 @@ class TestingViewController: UIViewController
@IBAction func addAlarm(_ sender: Any)
{
let (h, m, _) = Date().getHMS()
let alarms = Alarms.fromLocal()
alarms.list.append(Alarm(hour: h, minute: m, text: "Test alarm - \(h * m)", wakeMethod: wvms[0]))
alarms.localSave()
Alarms.fromLocal().apply { $0.list.append(Alarm(hour: h, minute: m, text: "Test alarm - \(h * m)", wakeMethod: wvms[0], lastActivate: Date().added(.minute, -1))) }.localSave()
}
@IBAction func deleteAlarm(_ sender: Any)
{
let alarms = Alarms.fromLocal()
alarms.list.removeAll()
alarms.localSave()
Alarms.fromLocal().apply { $0.list.removeAll() }.localSave()
}
}