Added support for event times

notifications nex?
This commit is contained in:
neon443
2025-03-25 20:40:51 +00:00
parent d85ea08ba3
commit 4f36b52548
7 changed files with 59 additions and 26 deletions

View File

@@ -26,6 +26,7 @@ struct Event: Identifiable, Codable {
var color: ColorCodable
var description: String
var date: Date
var time: Bool
var recurrence: RecurrenceType
enum RecurrenceType: String, Codable, CaseIterable {
@@ -159,6 +160,7 @@ class EventViewModel: ObservableObject {
color: ColorCodable,
description: String,
date: Date,
time: Bool,
recurrence: Event.RecurrenceType
) {
let newEvent = Event(
@@ -167,6 +169,7 @@ class EventViewModel: ObservableObject {
color: color,
description: description,
date: date,
time: time,
recurrence: recurrence
)
events.append(newEvent)