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:
parent
25ac85f8a6
commit
b17d4766d8
|
@ -134,7 +134,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
swipe_refresh_layout.setOnRefreshListener {
|
swipe_refresh_layout.setOnRefreshListener {
|
||||||
refreshCalDAVCalendars(false)
|
refreshCalDAVCalendars(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
checkIsViewIntent()
|
checkIsViewIntent()
|
||||||
|
|
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue