feat: add change alerts for schedule updates with notifications

This commit is contained in:
2026-10-20 00:29:42 +03:00
parent f8984e72d9
commit 9b5062f0ed
13 changed files with 179 additions and 4 deletions

View File

@@ -35,6 +35,8 @@ struct UserSettings: Codable, Hashable {
var theme: ThemeMode = .system
var reminders = false
var reminderMinutes = 10
/** A notification when the background refresh finds changes in the group's document. */
var changeAlerts = true
var recent: [SavedGroup] = []
var display = Display()
/** Hidden lessons per group, as Lesson.hideKey values. */
@@ -54,6 +56,7 @@ extension UserSettings {
theme = try c.decodeIfPresent(ThemeMode.self, forKey: .theme) ?? .system
reminders = try c.decodeIfPresent(Bool.self, forKey: .reminders) ?? false
reminderMinutes = try c.decodeIfPresent(Int.self, forKey: .reminderMinutes) ?? 10
changeAlerts = try c.decodeIfPresent(Bool.self, forKey: .changeAlerts) ?? true
recent = try c.decodeIfPresent([SavedGroup].self, forKey: .recent) ?? []
display = try c.decodeIfPresent(Display.self, forKey: .display) ?? Display()
hiddenByGroup = try c.decodeIfPresent([String: [String]].self, forKey: .hiddenByGroup) ?? [:]