fix(pickers): keep non-syncing calendars out of the event targets (#78)

The new row states were documented as the reasons a calendar is missing from the
event and import pickers, but only three of the four were: a calendar whose
account keeps its events off the device is dimmed, switchless and marked "Not
synced" in the manager, and was still offered as a place to save a new or
imported event. Nothing there ever reaches the account, and CalendarProvider2
wipes the calendar's rows outright when the subscription is switched back on —
so the event is a dead end, saved into a calendar that also can't show it.

Both pickers now filter on one predicate, isEventTarget, which is the label set
restated: what the manager marks is what the picker leaves out, which is what
its "Missing a calendar?" footer promises. The manager's restore-from-backup row
uses it too, so the entry point and the picker behind it agree on whether there
is anywhere to import to.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-26 18:49:29 +02:00
parent 2c7d976d6f
commit 7ed19b37aa
7 changed files with 89 additions and 22 deletions

View File

@@ -14,8 +14,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Calendars your device isn't syncing are marked **Not synced**, moved to the
bottom of their account and left without a switch. None of their events are on
the device, so the switch they used to have could not have shown you anything
— the calendar simply looked broken. Whether an account syncs a calendar stays
that account's own app's decision ([#78]).
— the calendar simply looked broken. They are no longer offered when you pick
a calendar for a new or an imported event either: an event saved there would
never reach the account. Whether an account syncs a calendar stays that
account's own app's decision ([#78]).
- The birthday and anniversary calendars Calendula fills from your contacts are
marked **Filled from your contacts**, which is why they can't be picked for a
new event: anything you put there would be removed again on the next sync.