refactor: move glide assignment into bind

This commit is contained in:
jubb 2021-08-03 13:42:15 +10:00
parent 9b48d5d203
commit e064a6d7c3

View File

@ -39,6 +39,7 @@ class ConversationView : LinearLayout {
// region Updating // region Updating
fun bind(thread: ThreadRecord, isTyping: Boolean, glide: GlideRequests) { fun bind(thread: ThreadRecord, isTyping: Boolean, glide: GlideRequests) {
this.thread = thread this.thread = thread
profilePictureView.glide = glide
val unreadCount = thread.unreadCount val unreadCount = thread.unreadCount
if (thread.recipient.isBlocked) { if (thread.recipient.isBlocked) {
accentView.setBackgroundResource(R.color.destructive) accentView.setBackgroundResource(R.color.destructive)
@ -89,7 +90,6 @@ class ConversationView : LinearLayout {
else -> statusIndicatorImageView.setImageResource(R.drawable.ic_circle_check) else -> statusIndicatorImageView.setImageResource(R.drawable.ic_circle_check)
} }
post { post {
profilePictureView.glide = glide
profilePictureView.update(thread.recipient, thread.threadId) profilePictureView.update(thread.recipient, thread.threadId)
} }
} }