From 31afd978500347d592ff51e78dadea51b99a7e15 Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Sun, 17 Jan 2021 14:50:13 -0500 Subject: [PATCH] [+] Set alarm table cell's going off text --- ProjectClock/AlarmViewController.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ProjectClock/AlarmViewController.swift b/ProjectClock/AlarmViewController.swift index d8386d1..c58d0e2 100644 --- a/ProjectClock/AlarmViewController.swift +++ b/ProjectClock/AlarmViewController.swift @@ -62,5 +62,10 @@ class AlarmTableCell: UITableViewCell func setData(_ alarm: Alarm) { descriptionText.text = "- " + alarm.text + + if alarm.enabled, let n = alarm.nextActivate + { + goingOffText.text = "(Going off in \(n.timeIntervalSince(Date()).str()))" + } } }