Skip to content
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

LocalAddressBook: move contacts when renaming the address book account #1084

Merged
merged 5 commits into from
Oct 20, 2024

Conversation

rfc2822
Copy link
Member

@rfc2822 rfc2822 commented Oct 20, 2024

Purpose

Previously, renaming an address book (= address book account) resulted in all local contacts being dropped and re-synced.

However, contacts (and groups) should be kept when an address book account is renamed so that there are as little possibilities for errors as possible. For instance, at re-sync the server could be not available or there could be (temporary) problems with specific contacts which would not appear without re-sync etc.

Short description

Instead of renaming the account with AccountManager.renameAccount():

  1. a new account with the desired name is created,
  2. the contacts and groups are moved to the new account (without touching their dirty flag),
  3. the old account is deleted.

Checklist

  • The PR has a proper title, description and label.
  • I have self-reviewed the PR.
  • I have added documentation to complex functions and functions that can be used by other modules.
  • I have added reasonable tests or consciously decided to not add tests.

@rfc2822 rfc2822 self-assigned this Oct 20, 2024
@rfc2822 rfc2822 linked an issue Oct 20, 2024 that may be closed by this pull request
@rfc2822 rfc2822 added the bug Something isn't working label Oct 20, 2024
@rfc2822 rfc2822 force-pushed the rename-addressbook-without-contacts-resync branch from 72c39e5 to 10e94c1 Compare October 20, 2024 14:18
@rfc2822 rfc2822 marked this pull request as ready for review October 20, 2024 14:20
@rfc2822 rfc2822 changed the title LocalAddressBook: move contacts when renaming the address book account LocalAddressBook: move contacts when renaming the address book account Oct 20, 2024
@rfc2822 rfc2822 merged commit 138e517 into main-ose Oct 20, 2024
12 checks passed
@rfc2822 rfc2822 deleted the rename-addressbook-without-contacts-resync branch October 20, 2024 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Contacts are not moved when renaming address books
1 participant