style(lint): make use of ResourceCompat

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2024-11-29 16:09:06 +01:00 committed by Marcel Hibbe
parent 69cbf3ee7a
commit 6de05d8fa4
No known key found for this signature in database
GPG key ID: C793F8B59F43CE7B

View file

@ -131,10 +131,14 @@ class TemporaryMessageViewHolder(outgoingView: View, payload: Any) :
).first() ).first()
} }
parentChatMessage!!.activeUser = message.activeUser parentChatMessage.activeUser = message.activeUser
parentChatMessage.imageUrl?.let { parentChatMessage.imageUrl?.let {
binding.messageQuote.quotedMessageImage.visibility = View.VISIBLE binding.messageQuote.quotedMessageImage.visibility = View.VISIBLE
val placeholder = context.resources.getDrawable(R.drawable.ic_mimetype_image) val placeholder = ResourcesCompat.getDrawable(
context.resources,
R.drawable.ic_mimetype_image,
null
)
binding.messageQuote.quotedMessageImage.setImageDrawable(placeholder) binding.messageQuote.quotedMessageImage.setImageDrawable(placeholder)
binding.messageQuote.quotedMessageImage.load(it) { binding.messageQuote.quotedMessageImage.load(it) {
addHeader( addHeader(