Change MessageViewHolder::contactBadge to val

This commit is contained in:
Jacek Kuzniarski 2019-08-10 17:20:47 +02:00
parent 75db15ebbd
commit d01c75774c
2 changed files with 2 additions and 8 deletions

View file

@ -27,7 +27,6 @@ import com.fsck.k9.controller.MessageReference
import com.fsck.k9.helper.MessageHelper
import com.fsck.k9.mail.Address
import com.fsck.k9.mailstore.DatabasePreviewType
import com.fsck.k9.ui.ContactBadge
import com.fsck.k9.ui.messagelist.MessageListAppearance
import com.fsck.k9.fragment.MLFProjectionInfo.ACCOUNT_UUID_COLUMN
@ -134,12 +133,7 @@ class MessageListAdapter internal constructor(
val holder = MessageViewHolder(view, listItemListener)
val contactBadge = view.findViewById<ContactBadge>(R.id.contact_badge)
if (appearance.showContactPicture) {
holder.contactBadge = contactBadge
} else {
contactBadge.visibility = View.GONE
}
holder.contactBadge.isVisible = appearance.showContactPicture
appearance.fontSizes.setViewTextSize(holder.subject, subjectViewFontSize)

View file

@ -16,7 +16,7 @@ class MessageViewHolder(
) : View.OnClickListener {
var position = -1
var contactBadge: ContactBadge? = null
val contactBadge: ContactBadge = view.findViewById(R.id.contact_badge)
val subject: TextView = view.findViewById(R.id.subject)
val preview: TextView = view.findViewById(R.id.preview)
val date: TextView = view.findViewById(R.id.date)