Skip to content

Remove concept of main accounts #878

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

Closed
rfc2822 opened this issue Jul 2, 2024 · 3 comments · Fixed by #989
Closed

Remove concept of main accounts #878

rfc2822 opened this issue Jul 2, 2024 · 3 comments · Fixed by #989
Assignees
Labels
refactoring Internal improvement of existing functions

Comments

@rfc2822
Copy link
Member

rfc2822 commented Jul 2, 2024

Since the sync is being performed with workers instead of the Sync Adapter Framework, the concept of a "main account" for address book accounts has become obsolete.

We still need address book accounts for storing address books, but they are no longer required to be tied to a "main" account and could from now on exist on their own.

We should remove the concept of a "main" account as much as possible and maybe deprecate it where too hard to remove right now.

  • We can find the "main" account for an address book in it's corresponding DB collection (via serviceId).
  • We can find all (or specific) address books of a "main" account via the DB carddav collections as well. The URL is the common property between a DB carddav collection and a LocalAddressBook collection. Note that the association should in the future be made via ID.

Depends on #875
Depends on bitfireAT/davx5#603

@rfc2822 rfc2822 added the refactoring Internal improvement of existing functions label Jul 2, 2024
@rfc2822 rfc2822 changed the title SyncManager: take fields directly from collection SyncManager: take fields directly from DB collection Jul 2, 2024
Copy link

This PR/issue depends on:

@sunkup sunkup changed the title SyncManager: take fields directly from DB collection Remove concept of main accounts Aug 7, 2024
@sunkup sunkup moved this from Todo to In Progress in DAVx⁵ Releases Aug 16, 2024
@sunkup
Copy link
Member

sunkup commented Aug 19, 2024

This is harder than I anticipated, because LocalAddressBook extends AndroidAddressBook which is tied to an account (of course) and so has a field called "account" already. The name "mainAccount" is quite descriptive ...

@sunkup sunkup moved this from In Progress to Todo in DAVx⁵ Releases Aug 19, 2024
@rfc2822
Copy link
Member Author

rfc2822 commented Aug 19, 2024

and so has a field called "account" already. The name "mainAccount" is quite descriptive ...

Yes, but we shouldn't need it anymore, but use the collection ID as identifier instead. So

DB: collection with ID (belongs to service and account, but that shall not matter in this context anymore) ↔ LocalAddressbook with ID (association via ID) ↔ address book account (not related to main account anymore, but to the ID instead)

@sunkup sunkup linked a pull request Aug 20, 2024 that will close this issue
4 tasks
@sunkup sunkup moved this from Todo to In Progress in DAVx⁵ Releases Sep 16, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in DAVx⁵ Releases Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Internal improvement of existing functions
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants