Fix id of Items, saving
This commit is contained in:
@@ -2,7 +2,7 @@ import Foundation
|
||||
|
||||
protocol DateItem {
|
||||
|
||||
var id: String { get }
|
||||
var identifier: String { get }
|
||||
|
||||
var startDate: Date { get }
|
||||
|
||||
@@ -20,7 +20,7 @@ extension Sequence where Element: DateItem {
|
||||
func sortedByStartDateAndId() -> [Element] {
|
||||
sorted { (lhs, rhs) -> Bool in
|
||||
if lhs.startDate == rhs.startDate {
|
||||
return lhs.id < rhs.id
|
||||
return lhs.identifier < rhs.identifier
|
||||
}
|
||||
return lhs.startDate > rhs.startDate
|
||||
}
|
||||
|
Reference in New Issue
Block a user