refactor(calendar): group calendars by accounts in settings

Calendars in the "Select Calendars" settings section are now grouped by their source account with color indicators, making it possible to distinguish calendars that share the same name across different accounts.

Each account group header includes a toggle to select or deselect all calendars in that group.
This commit is contained in:
Amir Zarrinkafsh 2026-03-22 13:19:20 +11:00
commit d39c61c475
No known key found for this signature in database
GPG key ID: ECDB8EF9E77E4EBF
5 changed files with 74 additions and 10 deletions

View file

@ -146,6 +146,7 @@ class CalendarService: CalendarServiceProviding {
extension CalendarModel {
init(from calendar: EKCalendar) {
self.init(
accountName: calendar.accountTitle,
id: calendar.calendarIdentifier,
title: calendar.title,
color: calendar.color,
@ -267,7 +268,7 @@ extension Priority {
// MARK: - Helper Extensions
private extension EKCalendar {
extension EKCalendar {
var accountTitle: String {
switch source.sourceType {
case .local, .subscribed, .birthdays: