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: call updateSyncFrameworkSettings when address books are renamed #1112

Closed
Tracked by #1111
rfc2822 opened this issue Nov 1, 2024 · 3 comments
Closed
Tracked by #1111
Assignees
Labels
bug Something isn't working

Comments

@rfc2822
Copy link
Member

rfc2822 commented Nov 1, 2024

Currently, updateSyncFrameworkSettings is only called on create() and update().

This may cause extra syncs when address books are renamed.

It fixes itself anyway because sooner or later when LocalAddressBook.update() is called, which in turn calls updateSyncFrameworkSettings. However it should already be done correctly at the first try.

@sunkup
Copy link
Member

sunkup commented Nov 4, 2024

renameAccount() is only ever called from update(). Inside update(), updateSyncFrameworkSettings() is called unconditionally at the end of the method.

So my understanding is that every call of update() will always call updateSyncFrameworkSettings() and therefore updateSyncFrameworkSettings() will be called when address books are renamed.

However it should already be done correctly at the first try.

What exactly do you mean by this. Am I overlooking something?

@rfc2822
Copy link
Member Author

rfc2822 commented Nov 4, 2024

Yes, update, but not create. I think in the time between (address book has been created) and (first sync has called update()) the address book account is in an undefined state regarding the sync framework.

I think this causes extra automatic (initial periodic) syncs from the sync framework.

I'm not really sure but after the migration to 4.4.3.2 there are some unnecessary extra syncs which made me curious. As soon as the syncs are completed, there are no more additional extra syncs, so I suspect this could be because of that.

@sunkup
Copy link
Member

sunkup commented Nov 6, 2024

updateSyncFrameworkSettings() is already called inside update() after renameAccount(). No need to call it inside renameAccount() too.

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

2 participants