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.renameAccount() doesn't prepare accounts the same way as create() does #1111

Closed
3 tasks done
rfc2822 opened this issue Nov 1, 2024 · 1 comment
Closed
3 tasks done
Assignees
Labels
bug Something isn't working

Comments

@rfc2822
Copy link
Member

rfc2822 commented Nov 1, 2024

During a rename address book operation (renameAccount()), LocalAddressBook doesn't call updateSyncFrameworkSettings() when creating address books. This may cause one or two extra unnecessary syncs from the sync framework. It fixes itself anyway because sooner or later LocalAddressBook.update() will be called, which in turn calls updateSyncFrameworkSettings.

LocalAddressBook.create() does call updateSyncFrameworkSettings, but create() is not used by renameAccount(). Shared code should be in a separate method.

addressBook.settings (ContactsContract.Settings.SHOULD_SYNC and UNGROUPED_VISIBLE) are also not set when address books are created during renaming or when address books are updated.

addressBook.readOnly is also not set when renamed, but at least when updated.


It should be exactly documented in which state an address book account should be and how and when it gets into that state.

@rfc2822 rfc2822 added the bug Something isn't working label Nov 1, 2024
@rfc2822 rfc2822 self-assigned this Nov 1, 2024
@rfc2822
Copy link
Member Author

rfc2822 commented Nov 21, 2024

Done by the issues mentioned above

@rfc2822 rfc2822 closed this as completed Nov 21, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in DAVx⁵ Releases Nov 21, 2024
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
Status: Done
Development

No branches or pull requests

1 participant