summaryrefslogtreecommitdiff
path: root/DomainDig/LocalNotificationService.swift
diff options
context:
space:
mode:
Diffstat (limited to 'DomainDig/LocalNotificationService.swift')
-rw-r--r--DomainDig/LocalNotificationService.swift9
1 files changed, 9 insertions, 0 deletions
diff --git a/DomainDig/LocalNotificationService.swift b/DomainDig/LocalNotificationService.swift
index f417619..d3474e3 100644
--- a/DomainDig/LocalNotificationService.swift
+++ b/DomainDig/LocalNotificationService.swift
@@ -140,6 +140,15 @@ final class LocalNotificationService {
)
}
+ func notifyScheduledReportReady(domainCount: Int) async {
+ await schedule(
+ identifier: "scheduled-report-\(UUID().uuidString)",
+ title: "Scheduled Report Ready",
+ body: "Report generated for \(domainCount) domain\(domainCount == 1 ? "" : "s").",
+ interruptionLevel: .active
+ )
+ }
+
func clearAllNotifications() async {
let center = UNUserNotificationCenter.current()
center.removeAllPendingNotificationRequests()