@@ -18,34 +18,33 @@ extension Order {
1818 /// Translates a Section Identifier into a Human-Readable String.
1919 ///
2020 static func descriptionForSectionIdentifier( _ identifier: String ) -> String {
21- guard let section = Sections ( rawValue: identifier) else {
21+ guard let age = Age ( rawValue: identifier) else {
2222 return String ( )
2323 }
2424
25- return section . description
25+ return age . description
2626 }
27+ }
2728
28- // MARK: - Private Helpers
29- fileprivate enum Sections : String {
30- case Months = " 0 "
31- case Weeks = " 2 "
32- case Days = " 4 "
33- case Yesterday = " 5 "
34- case Today = " 6 "
35-
36- var description : String {
37- switch self {
38- case . Months:
39- return NSLocalizedString ( " Older than a Month " , comment: " Notifications Months Section Header " )
40- case . Weeks:
41- return NSLocalizedString ( " Older than a Week " , comment: " Notifications Weeks Section Header " )
42- case . Days:
43- return NSLocalizedString ( " Older than 2 days " , comment: " Notifications +2 Days Section Header " )
44- case . Yesterday:
45- return NSLocalizedString ( " Yesterday " , comment: " Notifications Yesterday Section Header " )
46- case . Today:
47- return NSLocalizedString ( " Today " , comment: " Notifications Today Section Header " )
48- }
29+ enum Age : String {
30+ case months = " 0 "
31+ case weeks = " 2 "
32+ case days = " 4 "
33+ case yesterday = " 5 "
34+ case today = " 6 "
35+
36+ var description : String {
37+ switch self {
38+ case . months:
39+ return NSLocalizedString ( " Older than a Month " , comment: " Notifications Months Section Header " )
40+ case . weeks:
41+ return NSLocalizedString ( " Older than a Week " , comment: " Notifications Weeks Section Header " )
42+ case . days:
43+ return NSLocalizedString ( " Older than 2 days " , comment: " Notifications +2 Days Section Header " )
44+ case . yesterday:
45+ return NSLocalizedString ( " Yesterday " , comment: " Notifications Yesterday Section Header " )
46+ case . today:
47+ return NSLocalizedString ( " Today " , comment: " Notifications Today Section Header " )
4948 }
5049 }
5150}
0 commit comments