feat: Calendar selection for event list widget#1160
Merged
naveensingh merged 11 commits intoFossifyOrg:mainfrom Apr 28, 2026
Merged
feat: Calendar selection for event list widget#1160naveensingh merged 11 commits intoFossifyOrg:mainfrom
naveensingh merged 11 commits intoFossifyOrg:mainfrom
Conversation
Add nullable calendars field (String? DEFAULT NULL) to Widget entity for per-widget calendar filtering. NULL = fallback to global, empty = show nothing. - Widget.kt: add calendars field, isCalendarsConfigured(), getCalendarIdsAsList() - EventsDatabase.kt: bump version 11→12, MIGRATION_11_12 adds column - Constants.kt: add EVENT_LIST_CALENDARS intent extra key
- ic_settings_vector.xml: Material Settings gear icon (24dp) - strings.xml: add widget_calendars, widget_calendars_summary, widget_calendars_all
…widget Add per-widget calendar selection to the event list widget. Each widget instance can now filter events to specific calendars, overriding the global display settings. - Add overrideCalendarIds parameter to EventsHelper.getEventsSync() with widget-wins-completely logic (skips all global filter including birthday/anniversary) - Add calendars Intent extra to WidgetService for per-instance filtering - Add settings gear icon to widget header via direct PendingIntent - Add calendar picker row to widget config screen with SelectCalendarsDialog - Guard back press during re-configuration to avoid clearing widget - Disable save button until existing config loads from Room
Generated by KSP during build. Captures the new nullable calendars TEXT column on the widgets table introduced by migration 11->12.
Add calendar selection UI to the widget configuration screen with explicit tracking of user intent to distinguish three states: - null (never configured): falls back to global filter, shows 'All calendars' - empty string (explicitly chose none): shows 'No calendars selected' + warning - comma-separated IDs: shows 'N calendars selected' Changes: - Flatten widget_config_list.xml to ConstraintLayout - Add calendar picker button with SelectCalendarsDialog - Track mCalendarsExplicitlyChosen flag through config/reconfig cycle - Fix saveConfig to preserve explicit-zero as empty string sentinel - Fix updateCalendarPickerLabel for 3-state display - Show warning when zero calendars explicitly selected - Fix EventListWidgetAdapter intent parsing for null vs empty-string - Fix MyWidgetListProvider to only set calendars extra when non-null - Pre-check all calendars when default selection is used - Add ic_calendar_add_vector drawable and dimension resources
4e1fa50 to
f0a9793
Compare
5dba819 to
dea77fc
Compare
Replace ImageView with ImageButton and add accessibility labels for configure, new event, and show today actions in the event list widget header.
…Compat Remove @deprecated onBackPressed override in WidgetListConfigureActivity in favor of the compatibility-aware onBackPressedCompat/performDefaultBack pattern from the commons library.
…urce - Replace Map<Long, Int> with LongSparseArray<Int> in EventsHelper for Android-idiomatic long-keyed map usage - Use @color/dark_grey reference instead of hardcoded hex in debug launcher background drawable
naveensingh
approved these changes
Apr 28, 2026
Member
|
Hey, this got merged accidentally without review (script failure). Could you please recreate this PR? |
naveensingh
added a commit
that referenced
this pull request
Apr 28, 2026
9 tasks
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
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.
Type of change(s)
What changed and why
Tests performed
Before & after preview
Closes the following issue(s)
Checklist
CHANGELOG.md(if applicable).