updating commons

This commit is contained in:
tibbi 2020-05-25 13:33:24 +02:00
parent 2c2bfcfda0
commit 0f8b594ebd
3 changed files with 5 additions and 5 deletions

View File

@ -64,7 +64,7 @@ android {
}
dependencies {
implementation 'com.simplemobiletools:commons:5.27.5'
implementation 'com.simplemobiletools:commons:5.28.23'
implementation 'joda-time:joda-time:2.10.1'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4'

View File

@ -1351,7 +1351,7 @@ class EventActivity : SimpleActivity() {
(event_contact_name.layoutParams as RelativeLayout.LayoutParams).addRule(RelativeLayout.START_OF, event_contact_me_status.id)
}
val placeholder = BitmapDrawable(resources, context.getContactLetterIcon(event_contact_name.value))
val placeholder = BitmapDrawable(resources, SimpleContactsHelper(context).getContactLetterIcon(event_contact_name.value))
event_contact_image.apply {
attendee.updateImage(applicationContext, this, placeholder)
beVisible()

View File

@ -9,8 +9,8 @@ import android.widget.Filter
import com.simplemobiletools.calendar.pro.R
import com.simplemobiletools.calendar.pro.activities.SimpleActivity
import com.simplemobiletools.calendar.pro.models.Attendee
import com.simplemobiletools.commons.extensions.getContactLetterIcon
import com.simplemobiletools.commons.extensions.normalizeString
import com.simplemobiletools.commons.helpers.SimpleContactsHelper
import kotlinx.android.synthetic.main.item_autocomplete_email_name.view.*
class AutoCompleteTextViewAdapter(val activity: SimpleActivity, val contacts: ArrayList<Attendee>) : ArrayAdapter<Attendee>(activity, 0, contacts) {
@ -27,10 +27,10 @@ class AutoCompleteTextViewAdapter(val activity: SimpleActivity, val contacts: Ar
val nameToUse = when {
contact.name.isNotEmpty() -> contact.name
contact.email.isNotEmpty() -> contact.email
else -> "S"
else -> "A"
}
val placeholder = BitmapDrawable(activity.resources, context.getContactLetterIcon(nameToUse))
val placeholder = BitmapDrawable(activity.resources, SimpleContactsHelper(context).getContactLetterIcon(nameToUse))
listItem!!.apply {
tag = contact.name.isNotEmpty()
item_autocomplete_name?.text = contact.name