create a copy of contact items at updating them

This commit is contained in:
tibbi 2018-04-26 21:32:16 +02:00
parent 456a0ce17c
commit a3f3cc5fbe
3 changed files with 3 additions and 3 deletions

View File

@ -45,7 +45,7 @@ ext {
}
dependencies {
implementation 'com.simplemobiletools:commons:3.19.4'
implementation 'com.simplemobiletools:commons:3.19.21'
implementation 'joda-time:joda-time:2.9.9'
implementation 'com.facebook.stetho:stetho:1.5.0'

View File

@ -117,7 +117,7 @@ class ContactsAdapter(activity: SimpleActivity, var contactItems: ArrayList<Cont
fun updateItems(newItems: ArrayList<Contact>, highlightText: String = "") {
if (newItems.hashCode() != contactItems.hashCode()) {
contactItems = newItems
contactItems = newItems.clone() as ArrayList<Contact>
textToHighlight = highlightText
notifyDataSetChanged()
finishActMode()

View File

@ -9,7 +9,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.1'
classpath 'com.android.tools.build:gradle:3.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong