mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
use a background thread for deleting CalDAV events after disabling sync
This commit is contained in:
@ -182,10 +182,13 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
config.caldavSync = false
|
config.caldavSync = false
|
||||||
settings_manage_synced_calendars_holder.beGone()
|
settings_manage_synced_calendars_holder.beGone()
|
||||||
settings_caldav_pull_to_refresh_holder.beGone()
|
settings_caldav_pull_to_refresh_holder.beGone()
|
||||||
config.getSyncedCalendarIdsAsList().forEach {
|
|
||||||
CalDAVHandler(applicationContext).deleteCalDAVCalendarEvents(it.toLong())
|
Thread {
|
||||||
}
|
config.getSyncedCalendarIdsAsList().forEach {
|
||||||
dbHelper.deleteEventTypesWithCalendarId(config.caldavSyncedCalendarIDs)
|
CalDAVHandler(applicationContext).deleteCalDAVCalendarEvents(it.toLong())
|
||||||
|
}
|
||||||
|
dbHelper.deleteEventTypesWithCalendarId(config.caldavSyncedCalendarIDs)
|
||||||
|
}.start()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user