-
Notifications
You must be signed in to change notification settings - Fork 1
feat: show next alert time #132
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
base: master
Are you sure you want to change the base?
Conversation
| private const val CALENDAR_IS_HANDLED_KEY_PREFIX = "calendar_handled_" | ||
|
|
||
| private const val SNOOZE_PRESET_KEY = "pref_snooze_presets" //"15m, 1h, 4h, 1d" | ||
| private const val DISPLAY_NEXT_ALERT_TIME = "pref_display_next_alert_time" //false |
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.
alert or reminder?
| .map { this.startTime - it.millisecondsBefore } | ||
| .filter { it > anchor } | ||
| return futureReminders.maxOrNull() | ||
| } |
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.
Function returns furthest reminder instead of soonest one
The getNextAlertTimeAfter function uses maxOrNull() which returns the furthest future reminder, but the name and intended use suggest it should return the soonest one. The existing getNextEventReminderTime function in CalendarProvider.kt correctly uses minOrNull() for the same purpose. When a notification shows "reminder in 1h45m" but there's actually a reminder in 1h, users will be surprised by the earlier notification. This function should use minOrNull() instead.
| // startActivity( | ||
| // Intent(Intent.ACTION_VIEW).setData( | ||
| // ContentUris.withAppendedId( | ||
| // )v_dfadsfadfadsf ContentUris.withAppendedId( |
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.
Code Coverage Report
Files
|
📊 Code Coverage Summary
|
refs #90 #89 and #87
Note
Cursor Bugbot is generating a summary for commit 100762a. Configure here.