fix regression #1847, only set Sync Manual flag at caldav syncing, when we showToasts to the user (swipe_refresh, MainMenu->refresh_caldav_calendars, ...).

This commit is contained in:
Chris-GW 2022-11-09 20:27:27 +01:00
parent 25ac85f8a6
commit b17d4766d8
No known key found for this signature in database
GPG Key ID: A96C5FC432F8192E
2 changed files with 5 additions and 2 deletions

View File

@ -134,7 +134,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
} }
swipe_refresh_layout.setOnRefreshListener { swipe_refresh_layout.setOnRefreshListener {
refreshCalDAVCalendars(false) refreshCalDAVCalendars(true)
} }
checkIsViewIntent() checkIsViewIntent()

View File

@ -603,7 +603,10 @@ fun Context.refreshCalDAVCalendars(ids: String, showToasts: Boolean) {
Bundle().apply { Bundle().apply {
putBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, true) putBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, true)
if (showToasts) {
// Assume this is a manual synchronisation when we showToasts to the user (swipe_refresh, MainMenu->refresh_caldav_calendars, ...)
putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true) putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true)
}
accounts.forEach { accounts.forEach {
ContentResolver.requestSync(it, uri.authority, this) ContentResolver.requestSync(it, uri.authority, this)
} }