Merge pull request #1877 from Chris-GW/fix_manual_flag_caldav_syncing
Set the "Manual" flag in the caldav sync, only if it is triggered by the user and he is notified via toasts
This commit is contained in:
commit
93c13cc470
|
@ -134,7 +134,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||
}
|
||||
|
||||
swipe_refresh_layout.setOnRefreshListener {
|
||||
refreshCalDAVCalendars(false)
|
||||
refreshCalDAVCalendars(true)
|
||||
}
|
||||
|
||||
checkIsViewIntent()
|
||||
|
|
|
@ -603,7 +603,10 @@ fun Context.refreshCalDAVCalendars(ids: String, showToasts: Boolean) {
|
|||
|
||||
Bundle().apply {
|
||||
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)
|
||||
}
|
||||
accounts.forEach {
|
||||
ContentResolver.requestSync(it, uri.authority, this)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue