Skip to content
Snippets Groups Projects
Commit fb5a5162 authored by tina's avatar tina
Browse files

Merge branch '215-period-reminder-bug' into 'master'

wrongly triggered period reminders (bug)

Closes #215

See merge request bloodyhealth/drip!92
parents 68f3faaf 107688ac
No related branches found
No related tags found
No related merge requests found
......@@ -64,14 +64,17 @@ function setupPeriodReminder() {
.hours(6)
.minutes(0)
.seconds(0)
if (reminderDate.isAfter()) {
// period is likely to start in 3 to 3 + (length of prediction - 1) days
const daysToEndOfPrediction = bleedingPrediction[0].length + 2
const daysToEndOfPrediction = bleedingPrediction[0].length + 2
Notification.localNotificationSchedule({
id: '2',
message: labels.periodReminder.notification(daysToEndOfPrediction),
date: reminderDate.toDate(),
vibrate: false
})
Notification.localNotificationSchedule({
id: '2',
message: labels.periodReminder.notification(daysToEndOfPrediction),
date: reminderDate.toDate(),
vibrate: false
})
}
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment