New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create reminder #119
Create reminder #119
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
//TODO: Check if Optional is present before .get() | ||
reminder = reminders.get(0).getReminder().get(); | ||
synchronized (reminders) { | ||
while (reminder != null && reminder.getDateTime().isBefore(LocalDateTime.now())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Just wondering, how do you handle the case where the reminder is before the LocalDateTime? Does it inform the user?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, could you clarify what you mean? The code above handles the case where the reminder is before the LocalDateTime.now(). On the off-chance you meant to ask if the reminder is after LocalDateTime.now() then it should remain in reminders list as the loop continues to check for reminders that are due to show.
No description provided.