fix(calendars): tell two same-named accounts apart (#77)

Calendars were grouped by account name alone, so a Google account and a DAVx5
account for the same address became one group. That is more than a mis-grouping:
the header's source logo and "manage in app" came off cals.first(), so it could
send you to the wrong app; "toggle all" spanned both accounts; and the collapsed
state, keyed on the name, folded both at once.

Grouping now keys on (name, type), in one shared place — Settings → Calendars,
the calendar picker and the drawer's filter each had their own copy with
slightly different fallbacks. The header takes its logo and manage action from
its own group's type, and the collapse set holds the key rather than the name.
Where a name really is shared, each group names the app it comes from, resolved
the same way the source icon is.
This commit is contained in:
2026-07-30 15:23:33 +02:00
parent 34f23ee14e
commit 05b64804bb
9 changed files with 224 additions and 52 deletions

View File

@@ -488,6 +488,8 @@
<string name="calendars_synced_header">Synced calendars</string>
<string name="calendars_synced_hint">These come from accounts on your device. Create and edit them in their own app.</string>
<string name="calendars_manage_in_app">Manage in app</string>
<!-- Account header when two accounts share a name: %1$s is the account, %2$s the app it comes from. -->
<string name="calendars_account_from_source">%1$s (%2$s)</string>
<string name="calendars_account_menu_a11y">More options for %1$s</string>
<string name="calendars_enable_all">Enable all</string>
<string name="calendars_disable_all">Disable all</string>