diff --git a/app/build.gradle b/app/build.gradle index 334aab6b0..92476c2a3 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -58,7 +58,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:5.16.12' + implementation 'com.simplemobiletools:commons:5.16.16' implementation 'joda-time:joda-time:2.10.1' implementation 'androidx.multidex:multidex:2.0.1' implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2' diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/MutableList.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/MutableList.kt deleted file mode 100644 index 66abd2c6a..000000000 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/MutableList.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.simplemobiletools.calendar.pro.extensions - -import com.simplemobiletools.calendar.pro.helpers.CHOPPED_LIST_DEFAULT_SIZE - -// inspired by https://stackoverflow.com/questions/2895342/java-how-can-i-split-an-arraylist-in-multiple-small-arraylists/2895365#2895365 -fun MutableList.getChoppedList(chunkSize: Int = CHOPPED_LIST_DEFAULT_SIZE): ArrayList> { - val parts = ArrayList>() - val listSize = this.size - var i = 0 - while (i < listSize) { - val newList = subList(i, Math.min(listSize, i + chunkSize)).toMutableList() as ArrayList - parts.add(newList) - i += chunkSize - } - return parts -} diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/Constants.kt index 4878387c7..696d37451 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/Constants.kt @@ -17,7 +17,6 @@ const val CALDAV = "Caldav" const val VIEW_TO_OPEN = "view_to_open" const val SHORTCUT_NEW_EVENT = "shortcut_new_event" const val REGULAR_EVENT_TYPE_ID = 1L -const val CHOPPED_LIST_DEFAULT_SIZE = 100 const val MONTHLY_VIEW = 1 const val YEARLY_VIEW = 2 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 356d9b660..e09774346 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 @@ -7,6 +7,7 @@ import com.simplemobiletools.calendar.pro.R 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) { diff --git a/build.gradle b/build.gradle index 256ea0838..e3fd3a56e 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.3.41' + ext.kotlin_version = '1.3.50' repositories { google() @@ -10,7 +10,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.4.2' + classpath 'com.android.tools.build:gradle:3.5.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "de.timfreiheit.resourceplaceholders:placeholders:0.3" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e03cdb52e..1f39dbdca 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue Apr 30 17:49:00 CEST 2019 +#Sun Aug 25 21:51:10 CEST 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip