From 160c96047c2dda6d13f8d97efb7039234257ea73 Mon Sep 17 00:00:00 2001 From: Aaron Date: Sun, 24 Jan 2021 16:49:11 -0500 Subject: [PATCH] Displays repeats in abbreviated forms. Repeating on weekends now only says weekend, instead of listing the days and so on. --- ProjectClock/AlarmViewController.swift | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ProjectClock/AlarmViewController.swift b/ProjectClock/AlarmViewController.swift index 5f30736..b2d847f 100644 --- a/ProjectClock/AlarmViewController.swift +++ b/ProjectClock/AlarmViewController.swift @@ -86,7 +86,15 @@ class AlarmTableCell: UITableViewCell daysActive.append(daysDict[index]) } } - repeatText.text = daysActive.joined(separator: ", ") + if daysDict == daysActive { + repeatText.text = "Repeats: Daily" + } else if daysActive == ["Sun", "Sat"] { + repeatText.text = "Repeats: Weekends" + } else if daysActive == ["Mon", "Tues", "Wed", "Thurs", "Fri"] { + repeatText.text = "Repeats: Weekdays" + } else { + repeatText.text = daysActive.joined(separator: ", ") + } } // Show next activation date