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