diff --git a/ProjectClock/Models.swift b/ProjectClock/Models.swift index 2705718..721788f 100644 --- a/ProjectClock/Models.swift +++ b/ProjectClock/Models.swift @@ -45,8 +45,14 @@ let wvms = [ //WVM(name: "Jump", desc: "Make a few jumps") ] -class Alarm: Codable +class Alarm: Codable, Equatable { + static func == (lhs: Alarm, rhs: Alarm) -> Bool { + return lhs.hour == rhs.hour && lhs.minute == rhs.minute && lhs.text == rhs.text && + lhs.alarmTone == rhs.alarmTone && lhs.notificationID == rhs.notificationID && + lhs.repeats == rhs.repeats + } + var enabled: Bool var hour: Int // Hour (24) var minute: Int