Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…nto Dev
  • Loading branch information
Roy-wonji committed Dec 4, 2023
2 parents 23a9400 + 3706fa3 commit fb4d38f
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ struct NotificationQuoteView: View {
let calendar = Calendar.current
let hour = calendar.component(.hour, from: profileViewModel.selectedTime)
let minute = calendar.component(.minute, from: profileViewModel.selectedTime)

var dateComponents = DateComponents()
dateComponents.hour = hour
dateComponents.minute = minute
Expand All @@ -87,7 +86,7 @@ struct NotificationQuoteView: View {
// let trigger = UNCalendarNotificationTrigger(dateMatching: dateComponents, repeats: false)
//
// let request = UNNotificationRequest(identifier: "notification", content: content, trigger: trigger)
let trigger = UNTimeIntervalNotificationTrigger(timeInterval: 1, repeats: false)
let trigger = UNCalendarNotificationTrigger(dateMatching: dateComponents, repeats: true)
let request = UNNotificationRequest(identifier: "notification", content: content, trigger: trigger)
UNUserNotificationCenter.current().add(request, withCompletionHandler: nil)

Expand Down

0 comments on commit fb4d38f

Please sign in to comment.