fix drawable for link previews

set drawable of referenceThumbImage to null. this hopefully avoids that wrong images are loaded from recycler view to wrong messages

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2022-12-07 16:44:29 +01:00
parent e869108ac7
commit 7f37a0fe63
No known key found for this signature in database
GPG key ID: C793F8B59F43CE7B

View file

@ -47,7 +47,7 @@ class LinkPreview {
binding.referenceName.text = "" binding.referenceName.text = ""
binding.referenceDescription.text = "" binding.referenceDescription.text = ""
binding.referenceLink.text = "" binding.referenceLink.text = ""
binding.referenceThumbImage.controller = null binding.referenceThumbImage.setImageDrawable(null)
if (!message.extractedUrlToPreview.isNullOrEmpty()) { if (!message.extractedUrlToPreview.isNullOrEmpty()) {
val credentials: String = ApiUtils.getCredentials(message.activeUser?.username, message.activeUser?.token) val credentials: String = ApiUtils.getCredentials(message.activeUser?.username, message.activeUser?.token)