Made Alarm Equatable (==)

Ignores WVM
This commit is contained in:
Aaron
2021-01-26 15:55:49 -05:00
parent 253c7641da
commit 2437c52faf
+7 -1
View File
@@ -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