refresh CalDAV calendars only if actually enabled

This commit is contained in:
tibbi 2019-11-18 23:10:44 +01:00
parent 2bb3e0dabe
commit 491fb95f6f

View File

@ -10,7 +10,10 @@ 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) if (context.config.caldavSync) {
context.refreshCalDAVCalendars(context.config.caldavSyncedCalendarIds, false)
}
context.recheckCalDAVCalendars { context.recheckCalDAVCalendars {
context.updateWidgets() context.updateWidgets()
} }