Skip to content

Calendar: Separate CalendarAccount from Calendar #778

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

benbucksch
Copy link
Collaborator

  • Instead of Calendar being an Account, separate them into 2 objects.
  • A CalendarAccount is created only when it has its own login, e.g. CalDAV.
  • Separate them also in the DB. Ditto, don't save calendars in accounts.db.
  • CalDAV: Allow to have several calendars per CalDAV account

@benbucksch benbucksch self-assigned this Jul 17, 2025
get serverID() {
return new URL(this.url).searchParams.get("serverID");
return new URL(this.account.url).searchParams.get("serverID");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is wrong; each ActiveSyncCalendar has its own serverID. You'll need to port 77ffe7f and update all of the places where the url gets used to use the new serverID instead. (Or I could try to do that separately after I've finished #771.)

import { gt } from "../../../l10n/l10n";

export class ActiveSyncError extends Error {
type: string;
code: string;
constructor(aCommand: string, aStatus: string, account: Account) {
constructor(aCommand: string, aStatus: string, account: Account | Calendar | Addressbook) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 231 of ActiveSyncEvent.ts passes this.calendar.account but you probably want to change that to this.calendar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants