[buteo-syncfw] Make profile enable setting to follow account one. Contributes to JB#53675
This reactivates the enable signal in AccountsHelper and correct the match between profile and account to ensure that profiles are following the enable setting of their respective account, if any.
@chriadam this is reusing some code you deactivated earlier because this code according to history was prone to race conditions... I've rewritten a large protion of this code indeed because it was messy and could create loops by touching the account itself in the signal. Now it's cleaner I think and only change the profiles that are associated to the account. From my testing on CalDAV, Netxcloud and webcal accounts, it is working as expected. Steps to reproduce :
- go to the account list page,
- long tap on an account and deactivate it,
- check that associated profiles are disabled,
- long tap again on the account and reenable it,
- check that only profiles associated to active services of the account are reenabled.
This is solving the issue that disabling a webcal account was not stopping the periodic sync. For other accounts, the plugins are always checking that the service is enabled when running.