From f4725ff59a51ddeef9e713c11be19eb66b600a4b Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 8 Jan 2021 16:29:52 +0100 Subject: [PATCH] updating commons to 5.32.23 --- app/build.gradle | 2 +- .../simplemobiletools/calendar/pro/helpers/EventsHelper.kt | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 9a1b3c282..1893a6ec7 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -64,7 +64,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:5.32.8' + implementation 'com.simplemobiletools:commons:5.32.23' implementation 'joda-time:joda-time:2.10.1' implementation 'androidx.multidex:multidex:2.0.1' implementation 'androidx.constraintlayout:constraintlayout:2.0.4' diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/EventsHelper.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/EventsHelper.kt index c119e8928..15b91ceb2 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/EventsHelper.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/EventsHelper.kt @@ -6,7 +6,6 @@ import androidx.collection.LongSparseArray import com.simplemobiletools.calendar.pro.extensions.* import com.simplemobiletools.calendar.pro.models.Event import com.simplemobiletools.calendar.pro.models.EventType -import com.simplemobiletools.commons.extensions.getChoppedList import com.simplemobiletools.commons.helpers.ensureBackgroundThread class EventsHelper(val context: Context) { @@ -146,7 +145,7 @@ class EventsHelper(val context: Context) { return } - ids.getChoppedList().forEach { + ids.chunked(30).forEach { val eventsWithImportId = eventsDB.getEventsByIdsWithImportIds(it) eventsDB.deleteEvents(it) @@ -165,7 +164,7 @@ class EventsHelper(val context: Context) { } } - private fun deleteChildEvents(ids: MutableList, deleteFromCalDAV: Boolean) { + private fun deleteChildEvents(ids: List, deleteFromCalDAV: Boolean) { val childIds = eventsDB.getEventIdsWithParentIds(ids).toMutableList() if (childIds.isNotEmpty()) { deleteEvents(childIds, deleteFromCalDAV)