mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
Working stuff
This commit is contained in:
parent
41118ddb4c
commit
8e003b620f
6 changed files with 91 additions and 3 deletions
|
|
@ -259,6 +259,13 @@ final class ReminderLiveActivityManager: ObservableObject {
|
|||
}
|
||||
if activeReminder != entry {
|
||||
activeReminder = entry
|
||||
DynamicIslandViewCoordinator.shared.toggleSneakPeek(
|
||||
status: true,
|
||||
type: .reminder,
|
||||
duration: Defaults[.reminderSneakPeekDuration],
|
||||
value: 0,
|
||||
icon: glyphName(for: entry.event)
|
||||
)
|
||||
}
|
||||
startTickerIfNeeded()
|
||||
} else {
|
||||
|
|
@ -269,4 +276,15 @@ final class ReminderLiveActivityManager: ObservableObject {
|
|||
scheduleEvaluation(at: entry.triggerDate)
|
||||
}
|
||||
}
|
||||
|
||||
private func glyphName(for event: EventModel) -> String {
|
||||
switch event.type {
|
||||
case .birthday:
|
||||
return "gift.fill"
|
||||
case .reminder(let completed):
|
||||
return completed ? "checkmark.circle" : "bell.fill"
|
||||
case .event:
|
||||
return event.isMeeting ? "person.2.fill" : "calendar"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue