Skip to content

Commit

Permalink
Merge branch 'main' into Update-ReactionTimeTest
Browse files Browse the repository at this point in the history
  • Loading branch information
czhang771 authored Mar 8, 2024
2 parents 4e26702 + 380ea88 commit abcdbc9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 16 deletions.
7 changes: 0 additions & 7 deletions PICS/Appointment/AppointmentBlock.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,6 @@ struct AppointmentBlock: View {
}
.buttonStyle(.bordered)
}
HStack {
Spacer()
Button(String(localized: "REQUIRED_ITEMS_HEADING")) {
showingSheet.toggle()
}
.buttonStyle(.bordered)
}
Spacer()
}
.padding()
Expand Down
16 changes: 8 additions & 8 deletions PICS/Appointment/AppointmentInformation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,17 @@ class AppointmentInformation {
content.title = String(localized: "APPT_REMINDER")
content.body = String(localized: "NOTIF_CONTENT") + appointmentDateString + String(localized: "PERIOD")

let monthBeforeId = scheduleNotification(for: date, with: DateComponents(month: -1), content: content, notificationCenter: notificationCenter)
_ = scheduleNotification(for: date, with: DateComponents(month: -1), content: content, notificationCenter: notificationCenter)

let weekBeforeId = scheduleNotification(for: date, with: DateComponents(day: -7), content: content, notificationCenter: notificationCenter)
_ = scheduleNotification(for: date, with: DateComponents(day: -7), content: content, notificationCenter: notificationCenter)

let daysBeforeId = scheduleNotification(for: date, with: DateComponents(day: -3), content: content, notificationCenter: notificationCenter)
_ = scheduleNotification(for: date, with: DateComponents(day: -3), content: content, notificationCenter: notificationCenter)

let dayBeforeId = scheduleNotification(for: date, with: DateComponents(day: -1), content: content, notificationCenter: notificationCenter)
_ = scheduleNotification(for: date, with: DateComponents(day: -1), content: content, notificationCenter: notificationCenter)

let minBeforeId = scheduleNotification(for: date, with: DateComponents(minute: -30), content: content, notificationCenter: notificationCenter)
_ = scheduleNotification(for: date, with: DateComponents(minute: -30), content: content, notificationCenter: notificationCenter)

let appointmentId = scheduleNotification(for: date, with: nil, content: content, notificationCenter: notificationCenter)
_ = scheduleNotification(for: date, with: nil, content: content, notificationCenter: notificationCenter)
}


Expand All @@ -122,9 +122,9 @@ class AppointmentInformation {
if let components = components, let scheduledDate = Calendar.current.date(byAdding: components, to: date) {
notificationDate = scheduledDate
}

let trigger: UNNotificationTrigger
if let components = components {
if components != nil {
trigger = UNCalendarNotificationTrigger(
dateMatching: Calendar.current.dateComponents([.year, .month, .day, .hour, .minute], from: notificationDate),
repeats: false
Expand Down
2 changes: 1 addition & 1 deletion PICS/Resources/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "The app will send you notifications to remind you about your upcoming appointments."
"value" : "The app will send you notifications to remind you about your upcoming appointments and scheduled questionnaires."
}
}
}
Expand Down

0 comments on commit abcdbc9

Please sign in to comment.