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
|
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()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user