feat(sharing): show shared calendars read-only (parity with server/Android)

- Parse the server's new read_only flag on events.
- Filter sheet: a calendar shared with me is listed under the owner's name
  (sharedBy) with a lock icon when I only have read access.
- loadWritableCalendars: exclude read-only shared calendars so they no longer
  appear in the event editor (a save would 403).

The group-title prefix removal is server-side and needs no iOS change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Scarriffle
2026-07-04 18:56:32 +02:00
parent 325f357357
commit 9db04361cc
3 changed files with 19 additions and 5 deletions

View File

@@ -597,7 +597,9 @@ class CalendarStore {
async let haCals = (try? await api.getHACalendars()) ?? []
var result: [WritableCalendar] = []
for cal in await localCals {
// Skip read-only shared calendars offering them in the event editor
// only leads to a 403 on save. Own + read_write (incl. group) stay.
for cal in await localCals where cal.owned || cal.permission == "read_write" {
result.append(WritableCalendar(id: "local-\(cal.id)", name: cal.name, color: cal.color, source: "local", numericId: cal.id))
}
for acc in await caldavAccs where acc.enabled {