TaskUtils: take updateSyncSettings into account

This commit is contained in:
Ricki Hirner 2024-03-16 00:26:15 +01:00
parent 732d925b4c
commit 322a7565b0
2 changed files with 4 additions and 5 deletions

View file

@ -70,8 +70,8 @@ object TaskUtils {
val settingsManager = EntryPointAccessors.fromApplication(context, TaskUtilsEntryPoint::class.java).settingsManager()
settingsManager.putString(Settings.SELECTED_TASKS_PROVIDER, providerName?.authority)
// update sync settings
SyncUtils.updateTaskSync(context)
if (updateSyncSettings)
SyncUtils.updateTaskSync(context)
}
}

View file

@ -88,9 +88,8 @@ object SyncUtils {
* Returns a list of all available sync authorities:
*
* 1. calendar authority
* 2. contacts authority (only if [withContacts] is *true* - mostly we don't want it included)
* 3. address books authority
* 4. tasks authority/ies (if available, when tasks managing app(s) installed)
* 2. address books authority
* 3. current tasks authority (if available)
*
* Checking the availability of authorities may be relatively expensive, so the
* result should be cached for the current operation.