do not recheck CalDAV synced calendars that often
This commit is contained in:
parent
2f055401ec
commit
2bb3e0dabe
|
@ -58,7 +58,7 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.simplemobiletools:commons:5.19.13'
|
implementation 'com.simplemobiletools:commons:5.19.14'
|
||||||
implementation 'joda-time:joda-time:2.10.1'
|
implementation 'joda-time:joda-time:2.10.1'
|
||||||
implementation 'androidx.multidex:multidex:2.0.1'
|
implementation 'androidx.multidex:multidex:2.0.1'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'
|
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'
|
||||||
|
|
|
@ -53,7 +53,6 @@ class CalDAVUpdateListener : JobService() {
|
||||||
mRunningParams = params
|
mRunningParams = params
|
||||||
|
|
||||||
if (params.triggeredContentAuthorities != null && params.triggeredContentUris != null) {
|
if (params.triggeredContentAuthorities != null && params.triggeredContentUris != null) {
|
||||||
refreshCalDAVCalendars(config.caldavSyncedCalendarIds, false)
|
|
||||||
recheckCalDAVCalendars {}
|
recheckCalDAVCalendars {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,11 +3,14 @@ package com.simplemobiletools.calendar.pro.receivers
|
||||||
import android.content.BroadcastReceiver
|
import android.content.BroadcastReceiver
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
import com.simplemobiletools.calendar.pro.extensions.config
|
||||||
import com.simplemobiletools.calendar.pro.extensions.recheckCalDAVCalendars
|
import com.simplemobiletools.calendar.pro.extensions.recheckCalDAVCalendars
|
||||||
|
import com.simplemobiletools.calendar.pro.extensions.refreshCalDAVCalendars
|
||||||
import com.simplemobiletools.calendar.pro.extensions.updateWidgets
|
import com.simplemobiletools.calendar.pro.extensions.updateWidgets
|
||||||
|
|
||||||
class CalDAVSyncReceiver : BroadcastReceiver() {
|
class CalDAVSyncReceiver : BroadcastReceiver() {
|
||||||
override fun onReceive(context: Context, intent: Intent) {
|
override fun onReceive(context: Context, intent: Intent) {
|
||||||
|
context.refreshCalDAVCalendars(context.config.caldavSyncedCalendarIds, false)
|
||||||
context.recheckCalDAVCalendars {
|
context.recheckCalDAVCalendars {
|
||||||
context.updateWidgets()
|
context.updateWidgets()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue