forked from quarck/CalendarNotification
-
Notifications
You must be signed in to change notification settings - Fork 1
feat: snooze all pill filters 215 #219
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
refs #215
ll code review issues addressed. Here's a summary of the fixes: **`MainActivityModern.kt`:** - Removed duplicate `saveFilterState()`/`restoreFilterState()` implementation - Now uses `FilterState.toBundle()` and `FilterState.fromBundle()` directly - Stores under `Consts.INTENT_FILTER_STATE` key to avoid any potential key collision - Removed unused constants (`STATE_CALENDAR_IDS`, `STATE_CALENDAR_NULL`, `STATE_STATUS_FILTERS`, `STATE_TIME_FILTER`) **`FilterState.kt`:** - Changed `toDisplayString()` to show "0 calendars" when `selectedCalendarIds` is an empty set - Empty set is a valid filter state that shows 0 events (none selected) - Removed the `if (count > 0)` check **`FilterState.kt`:** - Changed from `when` with `else -> null` to exhaustive `when` without `else` - Now the compiler will catch any future enum additions at compile time - Explicitly handles `TimeFilter.ALL` case with an empty block **`FilterStateTest.kt`** - Added 15 new tests: - Bundle serialization round-trip (all fields, null calendars, empty calendars, empty status, all time filters, all status options) - `hasActiveFilters()` (default, calendar filter, empty calendar, status filter, time filter) - `toDisplayString()` (no filters, calendar count, empty set, status names, multiple status, time filter, combined) **`ApplicationControllerCoreRobolectricTest.kt`** - Added 7 new tests: - `snoozeAllEvents` with no filter - `snoozeAllEvents` with status filter - `snoozeAllEvents` with calendar filter - `snoozeAllEvents` with search AND filter combined - `snoozeAllEvents` with empty calendar filter (none selected) - `snoozeAllEvents` with null filterState (backward compatibility) - `snoozeAllEvents` with time filter
Code Coverage Report
|
📊 Code Coverage Summary
|
dc0ec6d to
3e171a8
Compare
📊 Code Coverage Summary
|
📊 Code Coverage Summary
|
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.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
android/app/src/main/java/com/github/quarck/calnotify/ui/ActiveEventsFragment.kt
Show resolved
Hide resolved
📊 Code Coverage Summary
|
📊 Code Coverage Summary
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note
Implements filter-pill-aware bulk snoozing and improves user feedback when lists are empty or filtered.
ApplicationController.snoozeAllEvents(...)to acceptFilterStateand combine with search queryFilterStateviaINTENT_FILTER_STATE;MainActivityModernincludes it when launchingSnoozeAllActivityand shows no-events toasts when nothing matchesSnoozeAllActivityreadsFilterState, updates count/confirmation text, and forwards it to controllerFilterStatebundle (de)serialization,hasActiveFilters(),toDisplayString(...), and matching/filter helpersActiveEventsFragment,UpcomingEventsFragment, andDismissedEventsFragmentto reflect search/filtersFilterStateserialization/display and controller filtering; adaptDateTimeUtilsTestto fixed-time setupWritten by Cursor Bugbot for commit db5746b. This will update automatically on new commits. Configure here.