updating commons to 5.32.23
This commit is contained in:
parent
f026995648
commit
f4725ff59a
|
@ -64,7 +64,7 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.simplemobiletools:commons:5.32.8'
|
implementation 'com.simplemobiletools:commons:5.32.23'
|
||||||
implementation 'joda-time:joda-time:2.10.1'
|
implementation 'joda-time:joda-time:2.10.1'
|
||||||
implementation 'androidx.multidex:multidex:2.0.1'
|
implementation 'androidx.multidex:multidex:2.0.1'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
||||||
|
|
|
@ -6,7 +6,6 @@ import androidx.collection.LongSparseArray
|
||||||
import com.simplemobiletools.calendar.pro.extensions.*
|
import com.simplemobiletools.calendar.pro.extensions.*
|
||||||
import com.simplemobiletools.calendar.pro.models.Event
|
import com.simplemobiletools.calendar.pro.models.Event
|
||||||
import com.simplemobiletools.calendar.pro.models.EventType
|
import com.simplemobiletools.calendar.pro.models.EventType
|
||||||
import com.simplemobiletools.commons.extensions.getChoppedList
|
|
||||||
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
||||||
|
|
||||||
class EventsHelper(val context: Context) {
|
class EventsHelper(val context: Context) {
|
||||||
|
@ -146,7 +145,7 @@ class EventsHelper(val context: Context) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
ids.getChoppedList().forEach {
|
ids.chunked(30).forEach {
|
||||||
val eventsWithImportId = eventsDB.getEventsByIdsWithImportIds(it)
|
val eventsWithImportId = eventsDB.getEventsByIdsWithImportIds(it)
|
||||||
eventsDB.deleteEvents(it)
|
eventsDB.deleteEvents(it)
|
||||||
|
|
||||||
|
@ -165,7 +164,7 @@ class EventsHelper(val context: Context) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun deleteChildEvents(ids: MutableList<Long>, deleteFromCalDAV: Boolean) {
|
private fun deleteChildEvents(ids: List<Long>, deleteFromCalDAV: Boolean) {
|
||||||
val childIds = eventsDB.getEventIdsWithParentIds(ids).toMutableList()
|
val childIds = eventsDB.getEventIdsWithParentIds(ids).toMutableList()
|
||||||
if (childIds.isNotEmpty()) {
|
if (childIds.isNotEmpty()) {
|
||||||
deleteEvents(childIds, deleteFromCalDAV)
|
deleteEvents(childIds, deleteFromCalDAV)
|
||||||
|
|
Loading…
Reference in New Issue